Click here to Skip to main content
15,888,113 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs24-Sep-15 21:47
Saurabh18cs24-Sep-15 21:47 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Gerry Schmitz24-Sep-15 22:54
mveGerry Schmitz24-Sep-15 22:54 
SuggestionRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun24-Sep-15 7:45
J. Calhoun24-Sep-15 7:45 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs24-Sep-15 21:50
Saurabh18cs24-Sep-15 21:50 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun25-Sep-15 2:14
J. Calhoun25-Sep-15 2:14 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs25-Sep-15 20:06
Saurabh18cs25-Sep-15 20:06 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun28-Sep-15 3:06
J. Calhoun28-Sep-15 3:06 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs29-Sep-15 0:13
Saurabh18cs29-Sep-15 0:13 
Hi,

I tried your way of using wrappanel but using this it is aligning all the buttons to horizontal on default load itself.

below is my original code , it will help you to understand by button arrangement.

<UserControl x:Class="iPLAN20.Windows.LS.dckSafeDevt"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlnsBig Grin | :-D ="http://schemas.microsoft.com/expression/blend/2008"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:local="clr-namespace:iPLAN20.Model.LS"
xmlns:stb="clr-namespace:UIControls;assembly=iPLAN20UIControls" HorizontalAlignment="Left" VerticalAlignment="Top" Name="ucSafeDevt">
<UserControl.Resources>
<local:clsAppSiteModel x:Key="AppSiteModel"/>
</UserControl.Resources>
<Grid HorizontalAlignment="Left" Name="gridLandSafeguarding" DataContext="{StaticResource AppSiteModel}">
<Grid.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Resources\ButtonStyle.xaml"/>
<ResourceDictionary Source="..\..\Resources\textbox.xaml"/>
<ResourceDictionary Source="..\..\Resources\Common.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Grid.Resources>

<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>

<Label Grid.Row="0" Grid.Column="0" Style="{StaticResource ASCIILabelStyle}" Content="Site No.:" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<TextBox Text="{Binding TestText}" stb:AutoCompleteBehavior.AutoCompleteItemsSource="{Binding AppSiteList}" AutoWordSelection="True" Width="150" Name="txtSearchAppSite" TextAlignment="Center" Margin="5,5,0,5" VerticalContentAlignment="Center"/>
<Button IsDefault="True" x:Name="btnFind" Style="{StaticResource MetroButton}" Margin="1" Click="btnFind_Click">
<Button.Content>
<StackPanel Orientation="Horizontal">
<Image Source="/IPLAN20;component/Images/Search.png"/>
</StackPanel>
</Button.Content>
</Button>
</StackPanel>


<Label Style="{StaticResource ASCIILabelStyle}" Content="Commands:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<Button Grid.Row="2" Grid.Column="0" Height="50" x:Name="btnNewSite" Width="100" IsEnabled="True" HorizontalAlignment="Left" VerticalAlignment="Center" Click="btnNewSite_Click" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
New Site
</TextBlock>
</Button>

<Button Grid.Row="2" Grid.Column="1" x:Name="btnModifySite" Width="100" Height="50" IsEnabled="True" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
Modify Site
</TextBlock>
</Button>
<Button Grid.Row="2" Grid.Column="2" Height="50" x:Name="btnDraft" Width="100" IsEnabled="True" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
Save to Draft
</TextBlock>
</Button>
<Button Grid.Row="3" Grid.Column="0" Height="50" x:Name="btnLowHgtCtrl" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
Lowest Height Control
</TextBlock>
</Button>
<Button Grid.Row="3" Grid.Column="1" Height="50" x:Name="btnQCReport" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
QC Report
</TextBlock>
</Button>
<Button Grid.Row="3" Grid.Column="2" Height="50" x:Name="btnSendQC" Width="100" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
Send for QC
</TextBlock>
</Button>
<Button Grid.Row="4" Grid.Column="0" Height="50" x:Name="btnMaintainSchemechklst" Width="100" IsEnabled="True" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
Maintain Scheme Checklist
</TextBlock>
</Button>
<Button Grid.Row="4" Grid.Column="1" Height="50" x:Name="btnConfigureStryHghts" Width="100" IsEnabled="True" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource ButtonStyle}">
<TextBlock TextWrapping="Wrap" TextAlignment="Center" Style="{StaticResource TextBlockStyle}">
Configure Storey Heights
</TextBlock>
</Button>

<StackPanel Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="3" Orientation="Vertical" HorizontalAlignment="Stretch" >
<Label Style="{StaticResource ASCIILabelStyle}" Content="My Drafts:" HorizontalAlignment="Left" VerticalAlignment="Center"/>
<ListBox Name="listBoxDraftVersions" Height="200" Width="250" Background="Azure" Margin="3" ItemsSource="{Binding TheList}">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox Name="CheckBoxZone" Content="{Binding TheText}" Tag="{Binding TheValue}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>

<Button Content="Load" Grid.Row="6" Grid.Column="0" IsDefault="True" x:Name="btnLoad" Style="{StaticResource MetroButton}"/>
<Button Content="Reassign" Grid.Row="6" Grid.Column="1" IsDefault="True" x:Name="btnReassign" Style="{StaticResource MetroButton}"/>
<Button Content="Delete" Grid.Row="6" Grid.Column="2" IsDefault="True" x:Name="btnDelete" Style="{StaticResource MetroButton}"/>


</Grid>
</UserControl>
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun29-Sep-15 3:38
J. Calhoun29-Sep-15 3:38 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs29-Sep-15 17:28
Saurabh18cs29-Sep-15 17:28 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
J. Calhoun30-Sep-15 3:11
J. Calhoun30-Sep-15 3:11 
GeneralRe: Stopping resizing of usercontrol and grid cell visibility Pin
Saurabh18cs30-Sep-15 22:45
Saurabh18cs30-Sep-15 22:45 
QuestionWPF UI Loading Question Pin
Kevin Marois11-Sep-15 5:50
professionalKevin Marois11-Sep-15 5:50 
AnswerRe: WPF UI Loading Question Pin
Kenneth Haugland12-Sep-15 1:57
mvaKenneth Haugland12-Sep-15 1:57 
AnswerRe: WPF UI Loading Question Pin
Pete O'Hanlon12-Sep-15 11:36
mvePete O'Hanlon12-Sep-15 11:36 
GeneralRe: WPF UI Loading Question Pin
Kevin Marois14-Sep-15 15:27
professionalKevin Marois14-Sep-15 15:27 
GeneralRe: WPF UI Loading Question Pin
Dave Kreskowiak15-Sep-15 3:25
mveDave Kreskowiak15-Sep-15 3:25 
QuestionVerticalAlignment.Bottom Problem Pin
Kevin Marois11-Sep-15 5:36
professionalKevin Marois11-Sep-15 5:36 
AnswerRe: VerticalAlignment.Bottom Problem Pin
Kenneth Haugland20-Sep-15 22:07
mvaKenneth Haugland20-Sep-15 22:07 
SuggestionRe: VerticalAlignment.Bottom Problem Pin
J. Calhoun24-Sep-15 9:22
J. Calhoun24-Sep-15 9:22 
QuestionWPF How To Freeze The UI Pin
Kevin Marois10-Sep-15 5:57
professionalKevin Marois10-Sep-15 5:57 
QuestionSearchTextBox by sean a. hanley Pin
Saurabh18cs9-Sep-15 16:22
Saurabh18cs9-Sep-15 16:22 
SuggestionRe: SearchTextBox by sean a. hanley Pin
Richard MacCutchan9-Sep-15 22:16
mveRichard MacCutchan9-Sep-15 22:16 
AnswerRe: SearchTextBox by sean a. hanley Pin
Pete O'Hanlon9-Sep-15 23:02
mvePete O'Hanlon9-Sep-15 23:02 
QuestionExtract audio from a video and process it Pin
Member 119602474-Sep-15 7:41
Member 119602474-Sep-15 7:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.