MMRavari
جمعه 19 شهریور 1400, 12:08 عصر
با سلام
من میخوام در پنجره جدیدی که بصورت ResorceDictionery ایجاد میکنم از ریبون استفاده کنم
برای اینکار از دستورات زیر استفاده کردم
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:Ribbon="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="MainWindow" TargetType="{x:Type Window}">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="AllowsTransparency" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontFamily" Value="B Nazanin"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<Border x:Name="border" CornerRadius="15" BorderThickness="1,1,2,2" BorderBrush="Black">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="139"/>
<RowDefinition/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
اما وقتی میخوام Ribbbon رو برای نمایش بصورت زیر وارد کنم خطا میده
<Ribbon:Ribbon Grid.Row="0">
</Ribbon:Ribbon>
با خطا روبرو میشم
The name "Ribbon" does not exist in the namespace
من میخوام در پنجره جدیدی که بصورت ResorceDictionery ایجاد میکنم از ریبون استفاده کنم
برای اینکار از دستورات زیر استفاده کردم
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:Ribbon="http://schemas.microsoft.com/winfx/2006/xaml/presentation/ribbon"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="MainWindow" TargetType="{x:Type Window}">
<Setter Property="WindowStyle" Value="None"/>
<Setter Property="AllowsTransparency" Value="True"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontFamily" Value="B Nazanin"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<Border x:Name="border" CornerRadius="15" BorderThickness="1,1,2,2" BorderBrush="Black">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="139"/>
<RowDefinition/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
اما وقتی میخوام Ribbbon رو برای نمایش بصورت زیر وارد کنم خطا میده
<Ribbon:Ribbon Grid.Row="0">
</Ribbon:Ribbon>
با خطا روبرو میشم
The name "Ribbon" does not exist in the namespace