Add Collapsed Style to launcher menu button
This commit is contained in:
1 parent
6faeaed7f2
commit
ec849ad79c
3 files changed
+19
-1
No files matched your search
@@ -496,7 +496,7 @@
|
||||
<Setter Property="ItemTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<control:SparkMenuItem Content="{Binding title}" Command="{Binding command}" Style="{StaticResource LauncherMenuButton}" Icon="{Binding icon}" />
|
||||
<control:SparkMenuItem Content="{Binding title}" Command="{Binding command}" Style="{StaticResource LauncherMenuButton}" Icon="{Binding icon}" Collapsed="False"/>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
@@ -25,5 +25,19 @@ namespace mbts.ui.controls {
|
||||
public static readonly DependencyProperty IconProperty =
|
||||
DependencyProperty.Register("Icon", typeof(ImageSource), typeof(SparkMenuItem), new PropertyMetadata(default(ImageSource)));
|
||||
|
||||
|
||||
|
||||
|
||||
public bool Collapsed
|
||||
{
|
||||
get { return (bool)GetValue(CollapsedProperty); }
|
||||
set { SetValue(CollapsedProperty, value); }
|
||||
}
|
||||
|
||||
// Using a DependencyProperty as the backing store for Collapsed. This enables animation, styling, binding, etc...
|
||||
public static readonly DependencyProperty CollapsedProperty =
|
||||
DependencyProperty.Register("Collapsed", typeof(bool), typeof(SparkMenuItem), new PropertyMetadata(default(bool)));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,10 @@
|
||||
</Border>
|
||||
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Collapsed" Value="True">
|
||||
<Setter TargetName="button_content" Property="Visibility" Value="Collapsed" />
|
||||
<Setter TargetName="launcher_button_border" Property="MinWidth" Value="52" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsFocused" Value="True">
|
||||
<Setter TargetName="launcher_button_border" Property="Background" Value="{mbts:BTSColor UI.Button.mouseover_background}" />
|
||||
<Setter TargetName="menu_item_arrow" Property="Fill" Value="{DynamicResource StartMenuMouseOverBackground}" />
|
||||
|
||||
Reference in new issue
Block a user