Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - I can't get set HorizontalOffset on a ScrollViewer (bug in Nov CTP?)

 
 
Old 01-10-2006   #1 (permalink)
Philippe Lavoie


 
 

I can't get set HorizontalOffset on a ScrollViewer (bug in Nov CTP?)

Hi

I wanted to hook two scroll viewers together based on the example from
[1]. I can set the value of HorizontalScroll with C#, however doing it
inside XAML gives me an error

i.e.

<ScrollViewer HorizontalOffset="{Binding Path=HorizontalOffset,
ElementName=Master}" HorizontalScrollBarVisibility="hidden"
VerticalScrollBarVisibility="disabled" DockPanel.Dock="top">
<Grid DockPanel.Dock="top" Margin="0,0,18,0">
<ColumnDefinition Width="Auto"
SharedSizeGroup="BloggerColumn"/>
<ColumnDefinition Width="Auto"
SharedSizeGroup="BlogSiteColumn"/>
<ColumnDefinition Width="Auto"
SharedSizeGroup="BloggerOnlineStatusColumn"/>
<ColumnDefinition Width="*" SharedSizeGroup="BlogUrlColumn"/>

<Button Grid.Column="0" Template="{StaticResource Header}">
Blogger </Button>
<Button Grid.Column="1" Template="{StaticResource Header}"
> Blog Site </Button>

<Button Grid.Column="2" Template="{StaticResource Header}">
Status </Button>
<Button Grid.Column="3" Template="{StaticResource Header}"
> Blog Url </Button>

</Grid>
</ScrollViewer>
<ScrollViewer HorizontalScrollBarVisibility="visible"
Name="Master" ScrollChanged="HandleScrollChange">
<StackPanel IsItemsHost="true"/>
</ScrollViewer>

gives me

The property 'HorizontalOffset' is read-only and cannot be set from markup.


I think this is a bug. Can I manuall update the XSD or something like
that? Thanks

Phil


[1]
http://blogs.msdn.com/henryh/archive...23/431846.aspx

My System SpecsSystem Spec
Old 01-10-2006   #2 (permalink)
Michael Latta


 
 

Re: I can't get set HorizontalOffset on a ScrollViewer (bug in Nov CTP?)

HorizontalOffset is a read-only property in the Nov bits. There is a method
SetHorizontalOffset and the same for vertical. You can not bind a method.

Michael


"Philippe Lavoie" <philippe.lavoie@cactus.ca> wrote in message
news:OOtAq7CAGHA.3864@TK2MSFTNGP12.phx.gbl...
> Hi
>
> I wanted to hook two scroll viewers together based on the example from
> [1]. I can set the value of HorizontalScroll with C#, however doing it
> inside XAML gives me an error
>
> i.e.
>
> <ScrollViewer HorizontalOffset="{Binding Path=HorizontalOffset,
> ElementName=Master}" HorizontalScrollBarVisibility="hidden"
> VerticalScrollBarVisibility="disabled" DockPanel.Dock="top">
> <Grid DockPanel.Dock="top" Margin="0,0,18,0">
> <ColumnDefinition Width="Auto" SharedSizeGroup="BloggerColumn"/>
> <ColumnDefinition Width="Auto" SharedSizeGroup="BlogSiteColumn"/>
> <ColumnDefinition Width="Auto"
> SharedSizeGroup="BloggerOnlineStatusColumn"/>
> <ColumnDefinition Width="*" SharedSizeGroup="BlogUrlColumn"/>
>
> <Button Grid.Column="0" Template="{StaticResource Header}"> Blogger
> </Button>
> <Button Grid.Column="1" Template="{StaticResource Header}"
> > Blog Site </Button>

> <Button Grid.Column="2" Template="{StaticResource Header}"> Status
> </Button>
> <Button Grid.Column="3" Template="{StaticResource Header}"
> > Blog Url </Button>

> </Grid>
> </ScrollViewer>
> <ScrollViewer HorizontalScrollBarVisibility="visible" Name="Master"
> ScrollChanged="HandleScrollChange">
> <StackPanel IsItemsHost="true"/>
> </ScrollViewer>
>
> gives me
>
> The property 'HorizontalOffset' is read-only and cannot be set from
> markup.
>
>
> I think this is a bug. Can I manuall update the XSD or something like
> that? Thanks
>
> Phil
>
>
> [1]
> http://blogs.msdn.com/henryh/archive...23/431846.aspx



My System SpecsSystem Spec
Old 01-10-2006   #3 (permalink)
Philippe Lavoie


 
 

Re: I can't get set HorizontalOffset on a ScrollViewer (bug in NovCTP?)

Michael Latta wrote:
> HorizontalOffset is a read-only property in the Nov bits. There is a method
> SetHorizontalOffset and the same for vertical. You can not bind a method.
>


Any ideas on how I can upgrade this
http://blogs.msdn.com/henryh/archive...23/431846.aspx to the Nov CTP?

I have added a 'HandleScroll' event on the item scroller but I have
difficulties locating the header scroller from the code.

Any help would be appreciated.

Phil
My System SpecsSystem Spec
 

Thread Tools



Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46