我想设置我下载的自己的海关应用栏图标.如何设置这不起作用
<AppBarButton x:Name="save" Click="save_Click" Label="Save" Icon="Assets/icon/1.png" />
Run Code Online (Sandbox Code Playgroud) 我想用c#设置菜单弹出窗口背景,因为我在运行时创建弹出窗口我怎么能这样做我知道这个用xaml像这样
<Flyout.FlyoutPresenterStyle>
<Style TargetType="FlyoutPresenter">
<Setter Property="ScrollViewer.ZoomMode" Value="Enabled"/>
<Setter Property="Background" Value="Black"/>
<Setter Property="BorderBrush" Value="Gray"/>
<Setter Property="BorderThickness" Value="5"/>
<Setter Property="MinHeight" Value="300"/>
<Setter Property="MinWidth" Value="300"/>
</Style>
</Flyout.FlyoutPresenterStyle>
Run Code Online (Sandbox Code Playgroud)
如何使用c#实现这一目标?
我想在我的代码中使用c#更改FontStyle和FontWeight.
我试过这个:
textblock.FontStyle =FontStyle.Normal
Run Code Online (Sandbox Code Playgroud)
和
textblock.FontWeight =FontWeight.Bold
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我想用C#创建菜单弹出窗口.我试过这个
List<string> l = new List<string>();
l.Add("Rotate");
l.Add("Scale");
l.Add("Bring to Front");
l.Add("Send to Back");
MenuFlyout m = new MenuFlyout();
MenuFlyoutItem mn = l;
m.Items.Add(mn);
Run Code Online (Sandbox Code Playgroud)
它给出了错误,怎么做?