5 changed files with 114 additions and 6 deletions
@ -0,0 +1,49 @@ |
|||
<UserControl xmlns="https://github.com/avaloniaui" |
|||
> |
|||
<StackPanel Orientation="Vertical" Gap="4"> |
|||
<TextBlock Classes="h1">Popup</TextBlock> |
|||
<TextBlock Classes="h2">A Popup dialog</TextBlock> |
|||
<StackPanel Gap="4"> |
|||
<ToggleButton IsChecked="{Binding #flyout.IsOpen, Mode=TwoWay}" Width="150" ClickMode="Press" >Flyout Auto close</ToggleButton> |
|||
<ToggleButton IsChecked="{Binding #flyout2.IsOpen, Mode=TwoWay}" Width="150" ClickMode="Press" >Flyout Toggle</ToggleButton> |
|||
<Popup Name="flyout" StaysOpen="False" Width="200" Height="100" > |
|||
<Border Background="LightGray" BorderBrush="Gray" BorderThickness="1" Padding="6" > |
|||
<StackPanel> |
|||
<DropDown> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item A</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item B</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item C</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item D</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item E</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item F</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item G</DropDownItem> |
|||
</DropDown> |
|||
<ToggleButton IsChecked="{Binding #nestedflyout.IsOpen, Mode=TwoWay}" Width="150" ClickMode="Press" >Nested Auto close</ToggleButton> |
|||
<Popup Name="nestedflyout" StaysOpen="False" Width="200" Height="200" > |
|||
<Border Background="LightGray" BorderBrush="Gray" BorderThickness="1" Padding="6" > |
|||
<StackPanel> |
|||
<TextBox>Nested Content</TextBox> |
|||
</StackPanel> |
|||
</Border> |
|||
</Popup> |
|||
</StackPanel> |
|||
</Border> |
|||
</Popup> |
|||
<Popup Name="flyout2" StaysOpen="True" Width="200" Height="100" > |
|||
<Border Background="LightGray" BorderBrush="Gray" BorderThickness="1" Padding="6" > |
|||
<StackPanel> |
|||
<DropDown> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item A</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item B</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item C</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item D</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item E</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item F</DropDownItem> |
|||
<DropDownItem ToolTip.Tip="Yet another nested popup">Item G</DropDownItem> |
|||
</DropDown> |
|||
</StackPanel> |
|||
</Border> |
|||
</Popup> |
|||
</StackPanel> |
|||
</StackPanel> |
|||
</UserControl> |
|||
@ -0,0 +1,19 @@ |
|||
using Avalonia; |
|||
using Avalonia.Controls; |
|||
using Avalonia.Markup.Xaml; |
|||
|
|||
namespace ControlCatalog.Pages |
|||
{ |
|||
public class PopupPage : UserControl |
|||
{ |
|||
public PopupPage() |
|||
{ |
|||
this.InitializeComponent(); |
|||
} |
|||
|
|||
private void InitializeComponent() |
|||
{ |
|||
AvaloniaXamlLoader.Load(this); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue