אולי אפשר רעיון כזה בו אתה פותח את הטבלה עצמה בגוגל דרייב עצמו דרך פקד webbrowser בתוך יוזר פורם
כמובן שתלוי מאוד מה התפקיד של הטבלאות וכו'
pcinfogmach
-
מסד נתונים בענן... התייעצות -
js לכבות ולהפעיל ניקוד וטעמיםבסוף הלכתי על הכיוון של @dovid
הנה דף דוגמא<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>חבקוק</title> <style> /* Style for the floating bar */ .floating-bar { position: fixed; bottom: 10px; left: 10px; background-color: #ffffff; padding: 10px; border: 1px solid #dddddd; border-radius: 5px; z-index: 999; } </style> </head> <body dir="rtl"> <div class="floating-bar"> <button onclick="toggleVowels()">ניקוד</button> <button onclick="toggleCantillation()">טעמים</button> </div> <p> . הַמַּשָּׂא֙ אֲשֶׁ֣ר חָזָ֔ה חֲבַקּ֖וּק הַנָּבִֽיא׃ <p> ב. עַד־אָ֧נָה יְהֹוָ֛ה שִׁוַּ֖עְתִּי וְלֹ֣א תִשְׁמָ֑ע אֶזְעַ֥ק אֵלֶ֛יךָ חָמָ֖ס וְלֹ֥א תוֹשִֽׁיעַ׃ <p> ג. לָ֣מָּה תַרְאֵ֤נִי אָ֙וֶן֙ וְעָמָ֣ל תַּבִּ֔יט וְשֹׁ֥ד וְחָמָ֖ס לְנֶגְדִּ֑י וַיְהִ֧י רִ֦יב וּמָד֖וֹן יִשָּֽׂא׃ <p> ד. עַל־כֵּן֙ תָּפ֣וּג תּוֹרָ֔ה וְלֹא־יֵצֵ֥א לָנֶ֖צַח מִשְׁפָּ֑ט כִּ֤י רָשָׁע֙ מַכְתִּ֣יר אֶת־הַצַּדִּ֔יק עַל־כֵּ֛ן יֵצֵ֥א מִשְׁפָּ֖ט מְעֻקָּֽל׃ <p> ה. רְא֤וּ בַגּוֹיִם֙ וְֽהַבִּ֔יטוּ וְהִֽתַּמְּה֖וּ תְּמָ֑הוּ כִּי־פֹ֙עַל֙ פֹּעֵ֣ל בִּימֵיכֶ֔ם לֹ֥א תַאֲמִ֖ינוּ כִּ֥י יְסֻפָּֽר׃ <p> ו. כִּֽי־הִנְנִ֤י מֵקִים֙ אֶת־הַכַּשְׂדִּ֔ים הַגּ֖וֹי הַמַּ֣ר וְהַנִּמְהָ֑ר הַהוֹלֵךְ֙ לְמֶרְחֲבֵי־אֶ֔רֶץ לָרֶ֖שֶׁת מִשְׁכָּנ֥וֹת לֹּא־לֽוֹ׃ <p> ז. אָיֹ֥ם וְנוֹרָ֖א ה֑וּא מִמֶּ֕נּוּ מִשְׁפָּט֥וֹ וּשְׂאֵת֖וֹ יֵצֵֽא׃ <p> ח. וְקַלּ֨וּ מִנְּמֵרִ֜ים סוּסָ֗יו וְחַדּוּ֙ מִזְּאֵ֣בֵי עֶ֔רֶב וּפָ֖שׁוּ פָּרָשָׁ֑יו וּפָֽרָשָׁיו֙ מֵרָח֣וֹק יָבֹ֔אוּ יָעֻ֕פוּ כְּנֶ֖שֶׁר חָ֥שׁ לֶאֱכֽוֹל׃ <p> ט. כֻּלֹּה֙ לְחָמָ֣ס יָב֔וֹא מְגַמַּ֥ת פְּנֵיהֶ֖ם קָדִ֑ימָה וַיֶּאֱסֹ֥ף כַּח֖וֹל שֶֽׁבִי׃ <p> י. וְהוּא֙ בַּמְּלָכִ֣ים יִתְקַלָּ֔ס וְרֹזְנִ֖ים מִשְׂחָ֣ק ל֑וֹ ה֚וּא לְכׇל־מִבְצָ֣ר יִשְׂחָ֔ק וַיִּצְבֹּ֥ר עָפָ֖ר וַֽיִּלְכְּדָֽהּ׃ <p> יא. אָ֣ז חָלַ֥ף ר֛וּחַ וַֽיַּעֲבֹ֖ר וְאָשֵׁ֑ם ז֥וּ כֹח֖וֹ לֵאלֹהֽוֹ׃ <p> יב. הֲל֧וֹא אַתָּ֣ה מִקֶּ֗דֶם יְהֹוָ֧ה אֱלֹהַ֛י קְדֹשִׁ֖י לֹ֣א נָמ֑וּת יְהֹוָה֙ לְמִשְׁפָּ֣ט שַׂמְתּ֔וֹ וְצ֖וּר לְהוֹכִ֥יחַ יְסַדְתּֽוֹ׃ <p> יג. טְה֤וֹר עֵינַ֙יִם֙ מֵרְא֣וֹת רָ֔ע וְהַבִּ֥יט אֶל־עָמָ֖ל לֹ֣א תוּכָ֑ל לָ֤מָּה תַבִּיט֙ בּֽוֹגְדִ֔ים תַּחֲרִ֕ישׁ בְּבַלַּ֥ע רָשָׁ֖ע צַדִּ֥יק מִמֶּֽנּוּ׃ <p> יד. וַתַּעֲשֶׂ֥ה אָדָ֖ם כִּדְגֵ֣י הַיָּ֑ם כְּרֶ֖מֶשׂ לֹא־מֹשֵׁ֥ל בּֽוֹ׃ <p> טו. כֻּלֹּה֙ בְּחַכָּ֣ה הֵֽעֲלָ֔ה יְגֹרֵ֣הוּ בְחֶרְמ֔וֹ וְיַאַסְפֵ֖הוּ בְּמִכְמַרְתּ֑וֹ עַל־כֵּ֖ן יִשְׂמַ֥ח וְיָגִֽיל׃ <p> טז. עַל־כֵּן֙ יְזַבֵּ֣חַ לְחֶרְמ֔וֹ וִֽיקַטֵּ֖ר לְמִכְמַרְתּ֑וֹ כִּ֤י בָהֵ֙מָּה֙ שָׁמֵ֣ן חֶלְק֔וֹ וּמַאֲכָל֖וֹ בְּרִאָֽה׃ <p> יז. הַ֥עַל כֵּ֖ן יָרִ֣יק חֶרְמ֑וֹ וְתָמִ֛יד לַהֲרֹ֥ג גּוֹיִ֖ם לֹ֥א יַחְמֽוֹל׃ {ס} <p> . הַמַּשָּׂא֙ אֲשֶׁ֣ר חָזָ֔ה חֲבַקּ֖וּק הַנָּבִֽיא׃ <p> ב. עַד־אָ֧נָה יְהֹוָ֛ה שִׁוַּ֖עְתִּי וְלֹ֣א תִשְׁמָ֑ע אֶזְעַ֥ק אֵלֶ֛יךָ חָמָ֖ס וְלֹ֥א תוֹשִֽׁיעַ׃ <p> ג. לָ֣מָּה תַרְאֵ֤נִי אָ֙וֶן֙ וְעָמָ֣ל תַּבִּ֔יט וְשֹׁ֥ד וְחָמָ֖ס לְנֶגְדִּ֑י וַיְהִ֧י רִ֦יב וּמָד֖וֹן יִשָּֽׂא׃ <p> ד. עַל־כֵּן֙ תָּפ֣וּג תּוֹרָ֔ה וְלֹא־יֵצֵ֥א לָנֶ֖צַח מִשְׁפָּ֑ט כִּ֤י רָשָׁע֙ מַכְתִּ֣יר אֶת־הַצַּדִּ֔יק עַל־כֵּ֛ן יֵצֵ֥א מִשְׁפָּ֖ט מְעֻקָּֽל׃ <p> ה. רְא֤וּ בַגּוֹיִם֙ וְֽהַבִּ֔יטוּ וְהִֽתַּמְּה֖וּ תְּמָ֑הוּ כִּי־פֹ֙עַל֙ פֹּעֵ֣ל בִּימֵיכֶ֔ם לֹ֥א תַאֲמִ֖ינוּ כִּ֥י יְסֻפָּֽר׃ <p> ו. כִּֽי־הִנְנִ֤י מֵקִים֙ אֶת־הַכַּשְׂדִּ֔ים הַגּ֖וֹי הַמַּ֣ר וְהַנִּמְהָ֑ר הַהוֹלֵךְ֙ לְמֶרְחֲבֵי־אֶ֔רֶץ לָרֶ֖שֶׁת מִשְׁכָּנ֥וֹת לֹּא־לֽוֹ׃ <p> ז. אָיֹ֥ם וְנוֹרָ֖א ה֑וּא מִמֶּ֕נּוּ מִשְׁפָּט֥וֹ וּשְׂאֵת֖וֹ יֵצֵֽא׃ <p> ח. וְקַלּ֨וּ מִנְּמֵרִ֜ים סוּסָ֗יו וְחַדּוּ֙ מִזְּאֵ֣בֵי עֶ֔רֶב וּפָ֖שׁוּ פָּרָשָׁ֑יו וּפָֽרָשָׁיו֙ מֵרָח֣וֹק יָבֹ֔אוּ יָעֻ֕פוּ כְּנֶ֖שֶׁר חָ֥שׁ לֶאֱכֽוֹל׃ <p> ט. כֻּלֹּה֙ לְחָמָ֣ס יָב֔וֹא מְגַמַּ֥ת פְּנֵיהֶ֖ם קָדִ֑ימָה וַיֶּאֱסֹ֥ף כַּח֖וֹל שֶֽׁבִי׃ <p> י. וְהוּא֙ בַּמְּלָכִ֣ים יִתְקַלָּ֔ס וְרֹזְנִ֖ים מִשְׂחָ֣ק ל֑וֹ ה֚וּא לְכׇל־מִבְצָ֣ר יִשְׂחָ֔ק וַיִּצְבֹּ֥ר עָפָ֖ר וַֽיִּלְכְּדָֽהּ׃ <p> יא. אָ֣ז חָלַ֥ף ר֛וּחַ וַֽיַּעֲבֹ֖ר וְאָשֵׁ֑ם ז֥וּ כֹח֖וֹ לֵאלֹהֽוֹ׃ <p> יב. הֲל֧וֹא אַתָּ֣ה מִקֶּ֗דֶם יְהֹוָ֧ה אֱלֹהַ֛י קְדֹשִׁ֖י לֹ֣א נָמ֑וּת יְהֹוָה֙ לְמִשְׁפָּ֣ט שַׂמְתּ֔וֹ וְצ֖וּר לְהוֹכִ֥יחַ יְסַדְתּֽוֹ׃ <p> יג. טְה֤וֹר עֵינַ֙יִם֙ מֵרְא֣וֹת רָ֔ע וְהַבִּ֥יט אֶל־עָמָ֖ל לֹ֣א תוּכָ֑ל לָ֤מָּה תַבִּיט֙ בּֽוֹגְדִ֔ים תַּחֲרִ֕ישׁ בְּבַלַּ֥ע רָשָׁ֖ע צַדִּ֥יק מִמֶּֽנּוּ׃ <p> יד. וַתַּעֲשֶׂ֥ה אָדָ֖ם כִּדְגֵ֣י הַיָּ֑ם כְּרֶ֖מֶשׂ לֹא־מֹשֵׁ֥ל בּֽוֹ׃ <p> טו. כֻּלֹּה֙ בְּחַכָּ֣ה הֵֽעֲלָ֔ה יְגֹרֵ֣הוּ בְחֶרְמ֔וֹ וְיַאַסְפֵ֖הוּ בְּמִכְמַרְתּ֑וֹ עַל־כֵּ֖ן יִשְׂמַ֥ח וְיָגִֽיל׃ <p> טז. עַל־כֵּן֙ יְזַבֵּ֣חַ לְחֶרְמ֔וֹ וִֽיקַטֵּ֖ר לְמִכְמַרְתּ֑וֹ כִּ֤י בָהֵ֙מָּה֙ שָׁמֵ֣ן חֶלְק֔וֹ וּמַאֲכָל֖וֹ בְּרִאָֽה׃ <p> יז. הַ֥עַל כֵּ֖ן יָרִ֣יק חֶרְמ֑וֹ וְתָמִ֛יד לַהֲרֹ֥ג גּוֹיִ֖ם לֹ֥א יַחְמֽוֹל׃ {ס} <script> const originalText = document.body.innerHTML; var isVowelsReversed = false; var isCantillationReversed = false; function toggleVowels() { var newText = originalText; if (!isVowelsReversed) { // Show/hide the specified vowels newText = newText.replace(/[\u05B0-\u05BD\u05C1\u05C2\u05C4\u05C5]/g, ""); } if (isCantillationReversed) { // Show/hide the specified cantillation marks newText = newText.replace(/[\u0591-\u05AF]/g, ""); } document.body.innerHTML = newText // Toggle the state isVowelsReversed = !isVowelsReversed; } function toggleCantillation() { var textElement = document.getElementById('originalText'); var newText = originalText; if (!isCantillationReversed) { // Show/hide the specified cantillation marks newText = newText.replace(/[\u0591-\u05AF]/g, ""); } if (isVowelsReversed) { // Show/hide the specified vowels newText = newText.replace(/[\u05B0-\u05BD\u05C1\u05C2\u05C4\u05C5]/g, ""); } document.body.innerHTML = newText // Toggle the state isCantillationReversed = !isCantillationReversed; } </script> </body> </html>
-
C#: פתיחת חלונית החיפוש של edge בפקד webview על ידי לחצן.אני משתמש בפקד webview ב C# WPF
אני רוצה לעשות לחצן בתוכנה שיפתח את חלונית החיפוש המובנית של הדפדפן (שזה בעצם הדפדפן edge של מיקרוסופט)
מה שכרגיל נפתח על ידי לחיצה על cntrl + f
זה החלוניתעל ידי js אי אפשר
https://stackoverflow.com/a/68483029
(לבינתיים עשיתי את מה שהציעו בלינק זה אבל החיפוש המובנה הרבה יותר יעיל). -
מסד נתונים בענן... התייעצות@מלא כתב במסד נתונים בענן... התייעצות:
ניסיתי להשתמש עם קובץ מגשר בדרופבוקס ובגוגל דרייב דקסטופ שקיבל והעביר את הנתונים
אבל אני מאוד לא מרוצה ולא רגוע עם זה.מה היה הבעיות?
-
wpf תחליף ל - avalondocks : ממשק משתמש דינמימצו"ב לינק לתחליף לavalon docks שגיבבתי מפה ומשם.
https://drive.google.com/drive/folders/1FnV-oHk0-4PsgsR5SkLdNo8oMkmR6J2e?usp=sharing
למי שלא יודע במה מדובר:
הרעיון הוא לספק פתרון בwpf ליצירת חלונות, פאנלים, כדי ליצור ממשק משתמש דינמי שבו חלונות ופאנלים יכולים להתעמס זה על גבי זה, להתקמץ, להתפשט, ולשנות את מיקומם. -
wpf tabcontrol כמו של winformsהצלחתי ב"ה
עריכה: הוספתי לו גם אפשרות להחליף מקומות של הטאבים:
<Window x:Class="wpflistview.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Title="MainWindow" Height="500" Width="800" > <Window.Resources> <!-- Style for the TabControl --> <Style x:Key="TabControlStyle" TargetType="TabControl"> <Setter Property="AllowDrop" Value="True"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TabControl"> <Grid x:Name="TabcontrolMainGrid"> <Border x:Name="TabcontrolMainBorder2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"> <Grid x:Name="TabcontrolMainGrid2"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!-- ListBox for headers --> <Grid x:Name="listBoxcontainerGrid" Grid.Row="0" Margin="0,0,0,-20"> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <ListBox x:Name="TabHeaderListBox" Margin="0" Grid.Column="0" Padding="-2,-2,0,1" ScrollViewer.HorizontalScrollBarVisibility="Visible" SelectionChanged="TabHeaderListBox_SelectionChanged" ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}" SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SelectedItem}" BorderBrush="{x:Null}" IsEnabled="True" Background="#FFFAFAFA"> <ListBox.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" /> </ItemsPanelTemplate> </ListBox.ItemsPanel> <ListBox.ItemTemplate> <DataTemplate> <Border x:Name="TabItemBorder" BorderThickness="1" BorderBrush="{x:Null}" Padding="5,2,5,2" Margin="-3,0,-3,0" PreviewMouseMove="TabItemBorder_PreviewMouseMove" DragOver="TabItemBorder_DragOver"> <Border.Effect> <DropShadowEffect ShadowDepth="1" BlurRadius="1" Color="Black" Opacity="0.5"/> </Border.Effect> <Border.Style> <Style TargetType="Border"> <Setter Property="Background" Value="#F0F0F0"/> <Style.Triggers> <DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}" Value="True"> <Setter Property="Background" Value="White"/> </DataTrigger> <!--<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}" Value="True"> <Setter Property="Background" Value="#40BFD4FF"/> </DataTrigger> <DataTrigger Binding="{Binding IsMouseOff, RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}}" Value="True"> <Setter Property="Background" Value="#F0F0F0"/> </DataTrigger>--> </Style.Triggers> </Style> </Border.Style> <StackPanel Orientation="Horizontal"> <TextBlock x:Name="tabItemTextBlock" Text="{Binding Header}" Margin="0,2,5,0"/> <Button Content="X" x:Name="TabCloseButton" Width="20" Height="20" Click="TabCloseButton_Click" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TabControl}}, Path=DataContext.CloseTabCommand}" CommandParameter="{Binding}" Background="{x:Null}" BorderBrush="{x:Null}" /> </StackPanel> </Border> </DataTemplate> </ListBox.ItemTemplate> </ListBox> <DockPanel HorizontalAlignment="Right" Background="#FFFAFAFA" Margin="0,3,2,23" Height="23"> <Button x:Name="TabscrollLeft" Content="◁" Click="TabscrollLeft_Click" Background="#F0F0F0" BorderThickness="0" BorderBrush="{x:Null}" Margin="0,0,2,0"> <Button.Effect> <DropShadowEffect ShadowDepth="1" BlurRadius="1" Color="Black" Opacity="0.5"/> </Button.Effect> </Button> <Button x:Name="TabsDropDown" Content="▽" Click="TabsDropDown_Click" Background="#F0F0F0" BorderThickness="0" BorderBrush="{x:Null}" Margin="0,0,2,0"> <Button.Effect> <DropShadowEffect ShadowDepth="1" BlurRadius="1" Color="Black" Opacity="0.5"/> </Button.Effect> <Button.ContextMenu> <ContextMenu/> </Button.ContextMenu> </Button> <Button x:Name="TabscrollRight" Content="▷" Click="TabscrollRight_Click" Background="#F0F0F0" BorderThickness="0" BorderBrush="{x:Null}"> <Button.Effect> <DropShadowEffect ShadowDepth="1" BlurRadius="1" Color="Black" Opacity="0.5"/> </Button.Effect> </Button> </DockPanel> </Grid> <!-- Content row --> <Border Grid.Row="1" Height="0.5" Background="{TemplateBinding BorderBrush}"/> <Border Grid.Row="2" x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0.5" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"> <ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> </Border> </Grid> </Border> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsEnabled" Value="False"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </Window.Resources> <Grid> <!-- Apply the custom style to the TabControl --> <TabControl Style="{StaticResource TabControlStyle}"> <!-- Add your tabs here --> <TabItem Header="Tab 1"> <!-- Tab 1 content --> </TabItem> <TabItem Header="Tab 2"> <!-- Tab 2 content --> </TabItem> <!-- Add more tabs as needed --> <TabItem Header="Tab 3"> asdfasdfasf </TabItem> <TabItem Header="Tab 4"> דכגשדגכשדכשדגכשדכג </TabItem> <!-- Add more tabs as needed --> <TabItem Header="Tab 5"> <!-- Tab 1 content --> </TabItem> <TabItem Header="Tab 6"> <!-- Tab 2 content --> </TabItem> <!-- Add more tabs as needed --> <TabItem Header="Tab 7"> <!-- Tab 1 content --> </TabItem> <TabItem Header="Tab 8"> <!-- Tab 2 content --> </TabItem> <!-- Add more tabs as needed --> </TabControl> </Grid> </Window>
using BetterTabs; using FirstFloor.ModernUI.Windows.Media; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace wpflistview { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void TabCloseButton_Click(object sender, RoutedEventArgs e) { // Handle the close button click event here if (sender is Button closeButton && closeButton.DataContext is TabItem tabItem) { // Your custom logic to close the tab // For example, remove the tab from the TabControl's Items collection var tabControl = FindParent<TabControl>(closeButton); (tabControl?.Items)?.Remove(tabItem); } } private void TabscrollLeft_Click(object sender, RoutedEventArgs e) { var tabControl = FindParent<TabControl>(sender as DependencyObject); if (tabControl != null) { int currentIndex = tabControl.SelectedIndex; if (currentIndex > 0) { tabControl.SelectedIndex = currentIndex - 1; } } } private void TabsDropDown_Click(object sender, RoutedEventArgs e) { Button button = (Button)sender; ContextMenu contextMenu = new ContextMenu(); foreach (TabItem tabItem in ((TabControl)button.TemplatedParent).Items) { MenuItem menuItem = new MenuItem { Header = tabItem.Header, Tag = tabItem }; menuItem.Click += TabMenuItem_Click; contextMenu.Items.Add(menuItem); } button.ContextMenu = contextMenu; button.ContextMenu.IsOpen = true; } private void TabMenuItem_Click(object sender, RoutedEventArgs e) // Event handler for context menu item click { ((ContextMenu)((MenuItem)sender).Parent).IsOpen = false; // Close the context menu TabItem selectedTab = (TabItem)((MenuItem)sender).Tag; // Get the associated TabItem from the Tag property ((TabControl)selectedTab.Parent).SelectedItem = selectedTab; // Set the selected tab in the TabControl } private void TabscrollRight_Click(object sender, RoutedEventArgs e) { var tabControl = FindParent<TabControl>(sender as DependencyObject); if (tabControl != null) { int currentIndex = tabControl.SelectedIndex; if (currentIndex < tabControl.Items.Count - 1) { tabControl.SelectedIndex = currentIndex + 1; } } } private static T FindParent<T>(DependencyObject child) where T : DependencyObject { // Find the parent of a specified type in the visual tree while (true) { DependencyObject parentObject = VisualTreeHelper.GetParent(child); if (parentObject == null) { return null; } if (parentObject is T parent) { return parent; } child = parentObject; } } private void TabHeaderListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListBox listBox = (ListBox)sender; if (listBox.SelectedItem != null) { listBox.ScrollIntoView(listBox.SelectedItem); } } private static T FindAncestor<T>(DependencyObject current) where T : DependencyObject { do { if (current is T ancestor) { return ancestor; } current = VisualTreeHelper.GetParent(current); } while (current != null); return null; } private void TabItemBorder_PreviewMouseMove(object sender, MouseEventArgs e) { if (sender is Border border && border.DataContext is TabItem tabItem && Mouse.PrimaryDevice.LeftButton == MouseButtonState.Pressed) { DragDrop.DoDragDrop(tabItem, tabItem, DragDropEffects.All); } } private void TabItemBorder_DragOver(object sender, DragEventArgs e) { if (e.Data.GetData(typeof(TabItem)) is TabItem tabItemSource && sender is Border border && border.DataContext is TabItem tabItemTarget && tabItemTarget.Parent is TabControl TergetTabControl) { int targetIndex = TergetTabControl.Items.IndexOf(tabItemTarget); TabControl SourceControl = tabItemSource.Parent as TabControl; SourceControl.Items.Remove(tabItemSource); TergetTabControl.Items.Insert(targetIndex, tabItemSource); tabItemSource.IsSelected = true; } } } }
-
wpf tabcontrol כמו של winforms@pcinfogmach
התקדמתי קצת עם הקוד אעדכן בהמשך אם זה מצליח כמו שרציתי -
wpf tabcontrol כמו של winformsתמונה של התוכנה עם הקוד הנ"ל.
-
wpf tabcontrol כמו של winforms@dovid
מושלם מצד ההתנהלות הכללית
רק מצד ה-layout של הטבים זה לא מושלםבwpf כשיש הרבה טאבים זה פשוט יוצר ערימה של טאבים
אני לא רוצה ערימה
בwinforms זה עושה סרט גלילה עם לחצנים של ימין ושמאל
ראיתי בצעה של מישהו להחליף את הסרט של הטאבים בwpf בסרט של toolbar וזה עובד אבל זה נראה מגעיל לטעמי.
הנה הלינק
https://stackoverflow.com/a/35347626הצלחתי להחליף את הסרט בlistbox אבל זה הורס את האפשרות להוסיף לחצנים של סגירה שיש בפרוייקט הזה.
קיצרתי קצת אם צריך עוד מידע נא להדריך אותי מה בדיוק צריך להביא. פשוט העסק קצת ארוך כמו שאמרתי -
wpf tabcontrol כמו של winformsמצאתי קוד של tabcontrol שמתנהג כמו avalondocks הוא ממש מושלם ואפשר כם מימין לשמאל. (קצת ארוך אז אני לא מביא אותו פה)
הוא משתמש אבל בtabcontrol הרגיל של wpf שזה עובד כמו swrappanel שהטאבים ממשיכים ויורדים שורה אם יש הרבה ולא כמו שמצוי שיש לחצנים של ימין שומאל.
מישהו יודע איך לעשות שיהיה טאבים יותר דומים לwinforms או משהו כזה?דם לא מצאתי מישהו שעשה כזה מוכן ומה שמצאתי לא באמת עבד לי מישהו מכיר אולי משהו מוכן?
-
avalon dock wpf מימין לשמאל?מישהו יודע איך לעשות את הטאבים של avalondock שיהיו מימין לשמאל?
(לעשות שהParent יהיה מימין לשמאל לא עזר)תודה מראש
-
AvalonDock בחלון קטן@dovid
אתה צודק הבעיה היתה בפקד - תודה! -
AvalonDock בחלון קטןאני משתמש עם avalonDock ב wpf
נתקלתי בבעיה כאשר החלון מצטמצם שאם החלון מפוצל לשניים אזי החלון העליון עולה מעל החלון התחתון ומסתיר את סרגל הכלים שלוכאשר התצוגה מצומצמצת המסמכים מתקרבים מדאי וחופפים אחד על השני
ככה אמור להיות:
זה מה שקורה כאשר החלון מוקטן - החלון העליון דורס את סרגל הכלים ואת הטאבים של התחתון:
-
AvalonDock WPF איך מוסיפים באופן תקין LayoutDocument@dovid כתב בבאג בAvalonDock WPF:
var pane = dockManager.Layout.Descendents().OfType<LayoutDocumentPane>().First();
pane.Children.Add(newLayoutDocument);נפלא! אכן פתר את הבעיה.
אם אפשר לשאל על עוד בעיה?
כאשר התצוגה מצומצמצת המסמכים מתקרבים מדאי וחופפים אחד על השני
-
AvalonDock WPF איך מוסיפים באופן תקין LayoutDocument@dovid
עשיתי את הנ"ל ולא עזר.
לא הצלחת לשחזר עם הקוד הנ"ל? -
AvalonDock WPF איך מוסיפים באופן תקין LayoutDocument@dovid כתב בבאג בAvalonDock WPF:
אז לדעתי כל הבעיות זה בגלל שלא יצרת מופע בכל פעם של הcntrlBookView.
כלומר זה אמור לחסוך גם את הגריד.יצרתי ולא עזר
-
Wpf פקד שיופיע לפני owned windowיש לי פרוייקט שפותח owned window מתוך הmainwondow
איך אני עושה שה usercontrol שנמצא בתוך הmainwindow יישאר בקידמה לפני הowned window? -
AvalonDock WPF איך מוסיפים באופן תקין LayoutDocument