when I minimize the popup menu window, how do I fix this?
C#
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:ReCraft.ViewModels"
xmlns:customControls="clr-namespace:ReCraft.ViewModels.CustomControls"
x:Class="ReCraft.Views.CustomControls.UserProfileMenu"
x:DataType="customControls:UserProfileMenuViewModel"
Width="175" MinHeight="50">
<Grid>
<ToggleButton Width="175" Name="ProfileButton" IsChecked="{Binding IsMenuOpen}" Background="Transparent" BorderBrush="Transparent">
<StackPanel Orientation="Horizontal" Spacing="10">
<Image Source="{Binding Avatar}" Width="40" Height="40" ClipToBounds="True">
<Image.Clip>
<EllipseGeometry Center="20,20" RadiusX="20" RadiusY="20"/>
</Image.Clip>
</Image>
<TextBlock Text="{Binding Username}" VerticalAlignment="Center"/>
</StackPanel>
</ToggleButton>
<Popup Width="175" PlacementTarget="{Binding #ProfileButton}" Placement="Bottom" IsOpen="{Binding IsMenuOpen}">
<Border Background="Transparent" CornerRadius="5" Padding="10" BorderBrush="#50FFFFFF" BorderThickness="0.6">
<StackPanel HorizontalAlignment="Center">
<Button Content="Профиль" Command="{Binding OpenProfileCommand}" Background="Transparent" BorderBrush="Transparent"/>
<Button Content="Выйти" Command="{Binding LogoutCommand}" Background="Transparent" BorderBrush="Transparent"/>
</StackPanel>
</Border>
</Popup>
</Grid>
</UserControl>
C#
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:ReCraft.ViewModels"
xmlns:customControls="clr-namespace:ReCraft.ViewModels.CustomControls"
x:Class="ReCraft.Views.CustomControls.UserProfileMenu"
x:DataType="customControls:UserProfileMenuViewModel"
Width="175" MinHeight="50">
<Grid>
<ToggleButton Width="175" Name="ProfileButton" IsChecked="{Binding IsMenuOpen}" Background="Transparent" BorderBrush="Transparent">
<StackPanel Orientation="Horizontal" Spacing="10">
<Image Source="{Binding Avatar}" Width="40" Height="40" ClipToBounds="True">
<Image.Clip>
<EllipseGeometry Center="20,20" RadiusX="20" RadiusY="20"/>
</Image.Clip>
</Image>
<TextBlock Text="{Binding Username}" VerticalAlignment="Center"/>
</StackPanel>
</ToggleButton>
<Popup Width="175" PlacementTarget="{Binding #ProfileButton}" Placement="Bottom" IsOpen="{Binding IsMenuOpen}">
<Border Background="Transparent" CornerRadius="5" Padding="10" BorderBrush="#50FFFFFF" BorderThickness="0.6">
<StackPanel HorizontalAlignment="Center">
<Button Content="Профиль" Command="{Binding OpenProfileCommand}" Background="Transparent" BorderBrush="Transparent"/>
<Button Content="Выйти" Command="{Binding LogoutCommand}" Background="Transparent" BorderBrush="Transparent"/>
</StackPanel>
</Border>
</Popup>
</Grid>
</UserControl>
7 Replies
C#
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using ReCraft.ViewModels;
using ReCraft.ViewModels.CustomControls;
using ReCraft.ViewModels.Screens;
namespace ReCraft.Views.CustomControls
{
public partial class UserProfileMenu : UserControl
{
public UserProfileMenu()
{
InitializeComponent();
}
public UserProfileMenu(MainWindowViewModel mainViewModel, MainContentViewModel mainContentViewModel)
{
InitializeComponent();
DataContext = new UserProfileMenuViewModel(mainViewModel, mainContentViewModel);
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}
C#
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using ReCraft.ViewModels;
using ReCraft.ViewModels.CustomControls;
using ReCraft.ViewModels.Screens;
namespace ReCraft.Views.CustomControls
{
public partial class UserProfileMenu : UserControl
{
public UserProfileMenu()
{
InitializeComponent();
}
public UserProfileMenu(MainWindowViewModel mainViewModel, MainContentViewModel mainContentViewModel)
{
InitializeComponent();
DataContext = new UserProfileMenuViewModel(mainViewModel, mainContentViewModel);
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}
}


What can be done?
@Pope At least have the decency to answer their question
some people are asking where's your profile picture is from because they are horny and they are too afraid to ask you cc @Pope
@Pope
can you give me some advice on how to fix this? @Pope
Unknown User•2mo ago
Message Not Public
Sign In & Join Server To View