Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

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

Closed Thread
 
Thread Tools Display Modes
Old 01-10-2006   #1 (permalink)
Philippe Lavoie
Guest


 

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
Old 01-10-2006   #2 (permalink)
Michael Latta
Guest


 

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



Old 01-10-2006   #3 (permalink)
Philippe Lavoie
Guest


 

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
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
ScrollViewer: how set SmallChange value condor Avalon 2 06-06-2007 02:01 PM
ScrollViewer breaks my WrapPanel steve Avalon 3 04-06-2007 06:27 PM








Vistax64.com 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 2005-2008

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 47 48 49 50