2016-10-13 9 views
1

私は以下のようなタイトルテンプレートを持つMahApp MetroWindowを使用しています。MahappメトロウィンドウタイトルはTaskBarに表示されません

<metro:MetroWindow x:Class="WpfApplication1.MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" 
    xmlns:local="clr-namespace:WpfApplication1"> 
<metro:MetroWindow.TitleTemplate> 
    <DataTemplate> 
     <Grid> 
      <TextBlock Text="New Title"/> 
     </Grid> 
    </DataTemplate> 
</metro:MetroWindow.TitleTemplate> 

問題は、それがタイトルを表示doesentタスクバーにあります。 enter image description here

答えて

1

タイトルプロパティをウィンドウに追加し、データテンプレートのテンプレートバインディングを実行します。これを試して。

<metro:MetroWindow x:Class="WpfApplication1.MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" 
    xmlns:local="clr-namespace:WpfApplication1" 
Title="New Title"> 
<metro:MetroWindow.TitleTemplate> 
    <DataTemplate> 
     <Grid> 
      <TextBlock Text="{TemplateBinding Content}"/> 
     </Grid> 
    </DataTemplate> 
</metro:MetroWindow.TitleTemplate> 
+0

これは機能します!!!! –

関連する問題