Je veux que l'image qui vient de l'usercontrol rayonne sur tout le fond jaune et pas seulement dans cette mince ligne.ce qui ne va pas avec l'étirement de mon usercontrol
J'ai tendu toutes les choses possibles là, mais j'ai encore ce problème
ma fenêtre principale
<Window x:Class="DBTool.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:View="clr-namespace:DBTool.View"
xmlns:ViewModel="clr-namespace:DBTool.ViewModel"
Title="MainWindow" Height="332" Width="528" >
<Window.Resources>
<!-- These four templates map a ViewModel to a View. -->
<DataTemplate DataType="{x:Type ViewModel:SelectDataBaseViewModel}">
<View:SelectDataBase />
</DataTemplate>
<DataTemplate DataType="{x:Type ViewModel:MySqlPageViewModel}">
<View:MySqlPageView />
</DataTemplate>
</Window.Resources>
<Grid ShowGridLines="True" HorizontalAlignment="Stretch" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*" />
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<ToolBar Grid.Row = "0" Height="26" HorizontalAlignment="Stretch" VerticalAlignment="Top" Name="toolBar1" Width="Auto" DockPanel.Dock="Top" />
<!-- <View:SelectDataBase x:Name="DetailView"/>-->
<Grid VerticalAlignment="Bottom" Grid.Row = "2" HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="4" Background="Azure" Margin="10" Command="{Binding Path=MoveNextCommand}" >Next</Button>
<Button Grid.Row="0" Grid.Column="3" Background="Azure" Margin="10" Command="{Binding Path=MovePreviousCommand}">Previous</Button>
</Grid>
<Border Background="Yellow" Grid.Row = "1">
<HeaderedContentControl VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" Content="{Binding Path=CurrentPage}" Header="{Binding Path=CurrentPage.DisplayName}" />
</Border>
</Grid>
le contrôle utilisateur
<UserControl x:Class="DBTool.View.SelectDataBase"
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:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d" VerticalContentAlignment="Stretch"
VerticalAlignment="Stretch" d:DesignHeight="300" d:DesignWidth="300" >
<UserControl.Background >
<ImageBrush Stretch="UniformToFill" ImageSource="..\Resources\DBSelection.jpg" ></ImageBrush >
</UserControl.Background >
<Grid VerticalAlignment="Stretch">
<!--<RadioButton Content="MySQL" Height="16" HorizontalAlignment="Left" Margin="36,112,0,0" Name="radioButton1" VerticalAlignment="Top" />
<RadioButton Content="MsSQL" Height="16" HorizontalAlignment="Left" Margin="36,134,0,0" Name="radioButton2" VerticalAlignment="Top" />-->
<ItemsControl FontWeight="Normal" ItemsSource="{Binding Path=AvailableBeanTypes}">
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton Content="{Binding Path=DisplayName}" IsChecked="{Binding Path=IsSelected}" GroupName="BeanType" Margin="2,3.5"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
seront heureux pour toute aide, tout ne peut pas résoudre ceci :-(
La seule solution qui fonctionne vraiment pour moi –