Created
September 9, 2022 12:34
-
-
Save ivanjx/d2592bcef8cd0261e493536495b405c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Grid> | |
<!-- Menu list --> | |
<StackPanel HorizontalAlignment="Left" | |
VerticalAlignment="Stretch" | |
Width="48" | |
Background="Black" | |
Panel.ZIndex="1"> | |
<Grid Background="Red" | |
HorizontalAlignment="Left" | |
Width="48" | |
Height="48" /> | |
<Grid Background="Green" | |
HorizontalAlignment="Left" | |
Width="48" | |
Height="48" /> | |
<Grid Background="Blue" | |
HorizontalAlignment="Left" | |
Width="48" | |
Height="48" /> | |
</StackPanel> | |
<!-- Content --> | |
<Grid HorizontalAlignment="Stretch" | |
VerticalAlignment="Stretch" | |
Margin="48,0,0,0"> | |
<TextBlock FontSize="20" | |
Text="this is content" /> | |
</Grid> | |
</Grid> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class HamburgerMenu : UserControl | |
{ | |
public static DependencyProperty MenusProperty = DependencyProperty.Register( | |
nameof(Menus), | |
typeof(FreezableCollection<HamburgerMenuItem>), | |
typeof(HamburgerMenu)); | |
public FreezableCollection<HamburgerMenuItem> Menus | |
{ | |
get => (FreezableCollection<HamburgerMenuItem>)GetValue(MenusProperty); | |
set => SetValue(MenusProperty, value); | |
} | |
public HamburgerMenu() | |
{ | |
InitializeComponent(); | |
Menus = new FreezableCollection<HamburgerMenuItem>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment