Home All Groups Group Topic Archive Search About

.Net 3.0 XAML attribute usage error: Width="{x:Static SystemParameters.ScrollWidth}"

Author
8 Dec 2006 8:03 PM
Plamen Ratchev
We have the following grid defined in XAML:



<Grid ShowGridLines="False" VerticalAlignment="Top" DockPanel.Dock="Top">

    <Grid.ColumnDefinitions>

        <ColumnDefinition Width="0.5*" />

        <ColumnDefinition Width="33" />

        <ColumnDefinition Width="0.5*" />

        <ColumnDefinition Width="17" /><!--{x:Static
SystemParameters.ScrollWidth}-->

    </Grid.ColumnDefinitions>

    <Grid.RowDefinitions>

        <RowDefinition Height="18" />

    </Grid.RowDefinitions>

    <TextBlock Grid.Column="0" Text="Test 1" HorizontalAlignment="Right"
VerticalAlignment="Center"/>

    <Image Grid.Column="1" Source="images/divider.png" Stretch="None"
HorizontalAlignment="Center" VerticalAlignment="Center"/>

    <TextBlock Grid.Column="2" Text="Test 2" HorizontalAlignment="Left"
VerticalAlignment="Center"/>

</Grid>





If we use <ColumnDefinition Width="{x:Static SystemParameters.ScrollWidth}"
/> it should work according to this MSDN article:
http://msdn2.microsoft.com/en-us/library/system.windows.systemparameters.scrollwidth.aspx.
However, we receive the following error:

["17" is not appropriate value for Width].



Any help would be appreciated.



Thanks!



Plamen Ratchev

http://www.SQLStudio.com

AddThis Social Bookmark Button