-
-
Notifications
You must be signed in to change notification settings - Fork 455
Fix Xaml Binding Errors #2714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Xaml Binding Errors #2714
Changes from all commits
a9f7935
ca58cc2
78d895e
f8d6f12
be64583
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,17 +6,20 @@ | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:sys="clr-namespace:System;assembly=mscorlib" | ||
| xmlns:ui="http://schemas.modernwpf.com/2019" | ||
| xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel" | ||
| xmlns:viewModels="clr-namespace:Flow.Launcher.SettingPages.ViewModels" | ||
| xmlns:wpftk="clr-namespace:WpfToolkit.Controls;assembly=VirtualizingWrapPanel" | ||
| Title="PluginStore" | ||
| FocusManager.FocusedElement="{Binding ElementName=PluginStoreFilterTextbox}" | ||
| KeyDown="SettingsPanePlugins_OnKeyDown" | ||
| d:DataContext="{d:DesignInstance viewModels:SettingsPanePluginStoreViewModel}" | ||
| d:DesignHeight="450" | ||
| d:DesignWidth="800" | ||
| FocusManager.FocusedElement="{Binding ElementName=PluginStoreFilterTextbox}" | ||
| KeyDown="SettingsPanePlugins_OnKeyDown" | ||
| mc:Ignorable="d"> | ||
| <ui:Page.Resources> | ||
| <CollectionViewSource x:Key="PluginStoreCollectionView" Source="{Binding ExternalPlugins}" Filter="PluginStoreCollectionView_OnFilter"> | ||
| <CollectionViewSource | ||
| x:Key="PluginStoreCollectionView" | ||
| Filter="PluginStoreCollectionView_OnFilter" | ||
| Source="{Binding ExternalPlugins}"> | ||
| <CollectionViewSource.GroupDescriptions> | ||
| <PropertyGroupDescription PropertyName="Category" /> | ||
| </CollectionViewSource.GroupDescriptions> | ||
|
|
@@ -34,9 +37,9 @@ | |
| <Border | ||
| Grid.Row="0" | ||
| Grid.Column="0" | ||
| Padding="5 18 0 0"> | ||
| Padding="5,18,0,0"> | ||
| <TextBlock | ||
| Margin="0 5" | ||
| Margin="0,5" | ||
| FontSize="30" | ||
| Style="{StaticResource PageTitle}" | ||
| Text="{DynamicResource pluginStore}" | ||
|
|
@@ -46,13 +49,13 @@ | |
| <DockPanel | ||
| Grid.Row="0" | ||
| Grid.Column="1" | ||
| Margin="5 24 0 0"> | ||
| Margin="5,24,0,0"> | ||
|
|
||
| <TextBox | ||
| Name="PluginStoreFilterTextbox" | ||
| Width="150" | ||
| Height="34" | ||
| Margin="0 0 26 0" | ||
| Margin="0,0,26,0" | ||
| HorizontalAlignment="Right" | ||
| ContextMenu="{StaticResource TextBoxContextMenu}" | ||
| DockPanel.Dock="Right" | ||
|
|
@@ -72,7 +75,7 @@ | |
| Stretch="None"> | ||
| <VisualBrush.Visual> | ||
| <Label | ||
| Padding="10 0 0 0" | ||
| Padding="10,0,0,0" | ||
| Content="{DynamicResource searchplugin}" | ||
| Foreground="{DynamicResource CustomContextDisabled}" /> | ||
| </VisualBrush.Visual> | ||
|
|
@@ -94,8 +97,8 @@ | |
| </TextBox> | ||
| <Button | ||
| Height="34" | ||
| Margin="0 5 10 5" | ||
| Padding="12 4" | ||
| Margin="0,5,10,5" | ||
| Padding="12,4" | ||
| HorizontalAlignment="Right" | ||
| VerticalAlignment="Center" | ||
| Command="{Binding RefreshExternalPluginsCommand}" | ||
|
|
@@ -108,8 +111,8 @@ | |
| Grid.Row="1" | ||
| Grid.Column="0" | ||
| Grid.ColumnSpan="2" | ||
| Margin="4 0 0 0" | ||
| Padding="0 0 18 0" | ||
| Margin="4,0,0,0" | ||
| Padding="0,0,18,0" | ||
| FontSize="14" | ||
| ItemContainerStyle="{StaticResource StoreList}" | ||
| ItemsSource="{Binding Source={StaticResource PluginStoreCollectionView}}" | ||
|
|
@@ -124,7 +127,7 @@ | |
| <ItemsPanelTemplate> | ||
| <wpftk:VirtualizingWrapPanel | ||
| x:Name="ItemWrapPanel" | ||
| Margin="0 0 0 10" | ||
| Margin="0,0,0,10" | ||
| ItemSize="216,184" | ||
| MouseWheelDelta="48" | ||
| Orientation="Vertical" | ||
|
|
@@ -143,7 +146,7 @@ | |
| <Grid> | ||
| <StackPanel Orientation="Vertical"> | ||
| <TextBlock | ||
| Margin="2 0 0 10" | ||
| Margin="2,0,0,10" | ||
| VerticalAlignment="Top" | ||
| FontSize="16" | ||
| FontWeight="Bold" | ||
|
|
@@ -159,7 +162,7 @@ | |
| </GroupStyle.ContainerStyle> | ||
| <GroupStyle.Panel> | ||
| <ItemsPanelTemplate> | ||
| <VirtualizingStackPanel Orientation="{Binding Orientation, Mode=OneWay}" /> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed here. Doesn't use orientation. |
||
| <VirtualizingStackPanel /> | ||
| </ItemsPanelTemplate> | ||
| </GroupStyle.Panel> | ||
| </GroupStyle> | ||
|
|
@@ -231,10 +234,10 @@ | |
| <VirtualizingStackPanel | ||
| Grid.Row="0" | ||
| Grid.Column="0" | ||
| Margin="5 0 0 0" | ||
| Margin="5,0,0,0" | ||
| Orientation="Horizontal"> | ||
| <TextBlock | ||
| Margin="0 0 5 0" | ||
| Margin="0,0,5,0" | ||
| VerticalAlignment="Center" | ||
| FontSize="14" | ||
| FontWeight="Bold" | ||
|
|
@@ -253,9 +256,12 @@ | |
| <TextBlock | ||
| Grid.Row="1" | ||
| Grid.Column="0" | ||
| Margin="5 4 0 0" | ||
| Margin="5,4,0,0" | ||
| TextWrapping="Wrap"> | ||
| <Hyperlink Foreground="{DynamicResource Color04B}" NavigateUri="{Binding Website}" RequestNavigate="Hyperlink_OnRequestNavigate"> | ||
| <Hyperlink | ||
| Foreground="{DynamicResource Color04B}" | ||
| NavigateUri="{Binding Website}" | ||
| RequestNavigate="Hyperlink_OnRequestNavigate"> | ||
| <Run FontSize="12" Text="{Binding Author, Mode=OneWay}" /> | ||
| </Hyperlink> | ||
| </TextBlock> | ||
|
|
@@ -264,40 +270,40 @@ | |
| Grid.Row="0" | ||
| Grid.RowSpan="2" | ||
| Grid.Column="1" | ||
| Margin="20 0 0 0" | ||
| Margin="20,0,0,0" | ||
| HorizontalAlignment="Right" | ||
| Orientation="Horizontal"> | ||
| <Button | ||
| MinHeight="42" | ||
| Margin="5 0" | ||
| Padding="15 5" | ||
| Margin="5,0" | ||
| Padding="15,5" | ||
| HorizontalAlignment="Stretch" | ||
| VerticalAlignment="Center" | ||
| Content="{DynamicResource installbtn}" | ||
| Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}" | ||
| Command="{Binding ShowCommandQueryCommand}" | ||
| CommandParameter="install" /> | ||
| CommandParameter="install" | ||
| Content="{DynamicResource installbtn}" | ||
| Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter='!'}" /> | ||
| <Button | ||
| MinHeight="42" | ||
| Margin="5 0" | ||
| Padding="15 5" | ||
| Margin="5,0" | ||
| Padding="15,5" | ||
| HorizontalAlignment="Right" | ||
| VerticalAlignment="Center" | ||
| Content="{DynamicResource uninstallbtn}" | ||
| Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}" | ||
| Command="{Binding ShowCommandQueryCommand}" | ||
| CommandParameter="uninstall" /> | ||
| CommandParameter="uninstall" | ||
| Content="{DynamicResource uninstallbtn}" | ||
| Visibility="{Binding LabelInstalled, Converter={StaticResource BoolToVisibilityConverter}}" /> | ||
| <Button | ||
| MinHeight="42" | ||
| Margin="5 0" | ||
| Padding="15 5" | ||
| Margin="5,0" | ||
| Padding="15,5" | ||
| HorizontalAlignment="Right" | ||
| VerticalAlignment="Center" | ||
| Command="{Binding ShowCommandQueryCommand}" | ||
| CommandParameter="update" | ||
| Content="{DynamicResource updatebtn}" | ||
| Style="{DynamicResource AccentButtonStyle}" | ||
| Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" | ||
| Command="{Binding ShowCommandQueryCommand}" | ||
| CommandParameter="update" /> | ||
| Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" /> | ||
| </VirtualizingStackPanel> | ||
| </Grid> | ||
| </ui:Flyout> | ||
|
|
@@ -308,15 +314,15 @@ | |
| <Image | ||
| Width="32" | ||
| Height="32" | ||
| Margin="18 24 0 0" | ||
| Margin="18,24,0,0" | ||
| HorizontalAlignment="Left" | ||
| RenderOptions.BitmapScalingMode="Fant" | ||
| Source="{Binding IcoPath, IsAsync=True}" /> | ||
| <Border | ||
| x:Name="LabelUpdate" | ||
| Height="12" | ||
| Margin="10 24 0 0" | ||
| Padding="6 2" | ||
| Margin="10,24,0,0" | ||
| Padding="6,2" | ||
| HorizontalAlignment="Left" | ||
| VerticalAlignment="Top" | ||
| Background="#45BD59" | ||
|
|
@@ -325,16 +331,16 @@ | |
| Visibility="{Binding LabelUpdate, Converter={StaticResource BoolToVisibilityConverter}}" /> | ||
| </StackPanel> | ||
| <TextBlock | ||
| Margin="18 10 18 0" | ||
| Margin="18,10,18,0" | ||
| FontWeight="SemiBold" | ||
| Foreground="{DynamicResource Color05B}" | ||
| Text="{Binding Name}" | ||
| TextWrapping="Wrap" | ||
| ToolTip="{Binding Version}" /> | ||
| <TextBlock | ||
| Height="60" | ||
| Margin="18 6 18 0" | ||
| Padding="0 0 0 10" | ||
| Margin="18,6,18,0" | ||
| Padding="0,0,0,10" | ||
| FontSize="12" | ||
| Foreground="{DynamicResource Color04B}" | ||
| Text="{Binding Description, Mode=OneWay}" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ | |
| d:DataContext="{d:DesignInstance viewModels:SettingsPaneThemeViewModel}" | ||
| d:DesignHeight="450" | ||
| d:DesignWidth="800" | ||
| Style="{DynamicResource SettingPageBasic}" | ||
| mc:Ignorable="d"> | ||
| <ui:Page.Resources> | ||
| <ResourceDictionary> | ||
|
|
@@ -112,10 +111,12 @@ | |
| Visibility="Visible" /> | ||
|
|
||
| <flowlauncher:ResultListBox | ||
| x:Name="ResultListBox" | ||
| Grid.Row="2" | ||
| DataContext="{Binding PreviewResults, Mode=OneTime}" | ||
| Visibility="Visible" /> | ||
|
|
||
| <Border x:Name="ContextMenu" Visibility="Collapsed" /> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a problem of attempting to control the context menu and history that do not exist in the preview area. So I added here.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is always Collapsed, then why would it be needed?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The preview area is created by importing the mainwindow. There is code in the main window code that tries to draw the contextmenu and history, which works here as well. We didn't insert that part here at all, because the visibility behavior code tries to touch the contextmenu and history, which causes a binding error. So I added an invisible layer with the same name to receive visibility related behaviors. Purely for error prevention. |
||
| <Border x:Name="History" Visibility="Collapsed" /> | ||
| </Grid> | ||
| </Border> | ||
| </Border> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this card for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
item in setting window. it's custom control included split setting window PR.
before
After