Print Page | Close Window

Markup and Size calculation

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=10911
Printed Date: 15 November 2025 at 4:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Markup and Size calculation
Posted By: WaLtI
Subject: Markup and Size calculation
Date Posted: 04 June 2008 at 5:04pm
<Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
    <Grid Height='Auto' Width='Auto'>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width='Auto'/>
            <ColumnDefinition Width='*'/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height='Auto'/>
        </Grid.RowDefinitions>
        <Image Grid.Column='0' Grid.Row='0' Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="50" Height="50" Source="red_shield.png">
        </Image>
        <StackPanel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center">
            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextAlignment="Left" Foreground="Black" Text="%1"></TextBlock>
        </StackPanel>
    </Grid>
</Page>
 
If i use this code in MarkupPad it displays nothing if i try the same code with the VS.NET XAML Designer it calculates the contents size based on its contents.
 
Regards
-Mike
 



Replies:
Posted By: Oleg
Date Posted: 05 June 2008 at 3:37am
HI,
 
Thanks for sample. 
 
Our markup didn't know about "'Auto'  in  <Grid Height='Auto' Width='Auto'>
just replace it to  <Grid>
 
Auto was supported only for ColumnDefinition and RowDefinition...
 
We will add "Auto" support for next release.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: WaLtI
Date Posted: 05 June 2008 at 6:36am
Thank you:-)
 
Regards,
-Mike
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net