Click here to Skip to main content
15,887,746 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Maximize and Restore Buttons Pin
Jason Gleim27-Aug-13 5:45
professionalJason Gleim27-Aug-13 5:45 
QuestionSliding Panel in Wpf Pin
MohammedRuman19-Aug-13 22:05
MohammedRuman19-Aug-13 22:05 
AnswerRe: Sliding Panel in Wpf Pin
Mycroft Holmes19-Aug-13 22:32
professionalMycroft Holmes19-Aug-13 22:32 
AnswerRe: Sliding Panel in Wpf Pin
Jason Gleim27-Aug-13 5:49
professionalJason Gleim27-Aug-13 5:49 
QuestionSilverlight and Android Application Interaction Pin
SwapnilSinnar18-Aug-13 1:39
SwapnilSinnar18-Aug-13 1:39 
AnswerRe: Silverlight and Android Application Interaction Pin
Mycroft Holmes18-Aug-13 11:50
professionalMycroft Holmes18-Aug-13 11:50 
AnswerRe: Silverlight and Android Application Interaction Pin
Jason Gleim27-Aug-13 5:54
professionalJason Gleim27-Aug-13 5:54 
QuestionHorizontal AND Vertical Virtualizing ItemsControl? Pin
Revolty14-Aug-13 8:03
Revolty14-Aug-13 8:03 
Im working on a EPG (Electronic Program Guide) were I need channels to be shown verticaly, and the programs of each channel horizontaly. It's basicly a Vertical ItemsControl containing Horizontal ItemsControls witch displays labels of different sizes. It looks something like this:
http://img401.imageshack.us/img401/1623/epgtimeline.png[^]

Im virtualizing the vertical list so that only 10 channels are created but with 500 programs (labels) on each channel gives me a total of 5000 - witch is way to many - I need to virtulaze the horizontal view to!

The problem I have is that the scrollviewer won't accept the offset that I set, it's beeing modefied (OnScrollChanged beeing called 2-3 times with small adjustments). I found a workaround by using BringIntoView instead, witch for some reason work. But I need to syncronize the scrollviewer with all 10 channels, and then I need to use SetHorizontalOffset again. Note that I use Pixel scrolling and that this behavior dosent exist using ordenary StackPanel.

What I'm wondering is if someone knows why the scroll of a virtulazingstackpanel is beeing changed, or if it's possible to only use one horizontal scroll for all (viewable) channels.

I'm open for any suggestions, this issue has bothering me for over a week now.

btw, the code looks like so (each Channel has a collection of Programs):
HTML
<ItemsControl Name="lwChannels"    
                      ItemsSource="{Binding ElementName=userControl, Path=Channels}"
                      FocusVisualStyle="{x:Null}"
                      ScrollViewer.CanContentScroll="True"
                      VirtualizingPanel.IsVirtualizing="True">
            <ItemsControl.Template>
                <ControlTemplate>
                        <UI:ScrollviewerX HorizontalScrollBarVisibility="Disabled" 
                                          VerticalScrollBarVisibility="Hidden">
                            <ItemsPresenter />
                        </UI:ScrollviewerX>
                </ControlTemplate>
            </ItemsControl.Template>
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Vertical" IsItemsHost="True" />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <!-- PROGRAMS -->
                    <ItemsControl ItemsSource="{Binding Programs}"                                        
                                  Height="{Binding ElementName=userControl, Path=RowHeight}"                                 
                                  ScrollViewer.CanContentScroll="True"
                                  VirtualizingPanel.IsVirtualizing="True"
                                  VirtualizingPanel.ScrollUnit="Pixel">
                        <ItemsControl.Template>
                            <ControlTemplate>
                                    <UI:ScrollviewerX HorizontalScrollBarVisibility="Hidden" 
                                                      VerticalScrollBarVisibility="Disabled"                                                       
                                                      PreviewKeyDown="OnScrollViewerPreviewKeyDown" 
                                                      ScrollChanged="ScrollviewerX_ScrollChanged" >
                                        <ItemsPresenter />
                                    </UI:ScrollviewerX>
                            </ControlTemplate>
                        </ItemsControl.Template>
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <VirtualizingStackPanel Orientation="Horizontal" IsItemsHost="True"/>
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <!-- PROGRAM -->
                                <Label Content="{Binding Path=Title}"  
                                   BorderThickness="2"
                                   MouseDown="OnProgramMouseDown"                                                        
Initialized="OnProgramInitialized"/>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>

AnswerRe: Are you a WPF guru? Pin
Pete O'Hanlon13-Aug-13 13:13
mvePete O'Hanlon13-Aug-13 13:13 
QuestionHow to confine mouse cursor to inkcanvas? Pin
hmdshr12-Aug-13 10:29
hmdshr12-Aug-13 10:29 
QuestionC!Drag Start and Drag Over Events are not firing in Map control of Silverlight with vb.net Pin
Member 101976818-Aug-13 3:35
Member 101976818-Aug-13 3:35 
QuestionHow to display a Windows in full screen on top of the taskbar in wpf? Pin
dharmaa.m6-Aug-13 2:17
dharmaa.m6-Aug-13 2:17 
AnswerRe: How to display a Windows in full screen on top of the taskbar in wpf? Pin
Mycroft Holmes6-Aug-13 12:48
professionalMycroft Holmes6-Aug-13 12:48 
AnswerRe: How to display a Windows in full screen on top of the taskbar in wpf? Pin
Richard Deeming7-Aug-13 0:57
mveRichard Deeming7-Aug-13 0:57 
Questioncreate hyberlink in string using RichTextBox control in WPF Pin
senthil kumar 2225-Aug-13 0:21
professionalsenthil kumar 2225-Aug-13 0:21 
QuestionHow to optimize loading time from RIA services Pin
Muhammad Naveed2-Aug-13 8:14
professionalMuhammad Naveed2-Aug-13 8:14 
QuestionListCollectionView customsort Pin
Sakhalean1-Aug-13 23:51
Sakhalean1-Aug-13 23:51 
QuestionRe: ListCollectionView customsort Pin
Kenneth Haugland6-Aug-13 20:32
mvaKenneth Haugland6-Aug-13 20:32 
AnswerRe: ListCollectionView customsort Pin
Sakhalean12-Aug-13 19:25
Sakhalean12-Aug-13 19:25 
QuestionToggle Menu horizontal [RESOLVED] Pin
juliogyn31-Jul-13 6:27
juliogyn31-Jul-13 6:27 
AnswerRe: Toggle Menu horizontal [RESOLVED] Pin
Mycroft Holmes31-Jul-13 12:39
professionalMycroft Holmes31-Jul-13 12:39 
QuestionWPF- MVVM - Listbox databinding and changing the listbox item color and isenabled property Pin
adi jeevan sagar30-Jul-13 18:43
adi jeevan sagar30-Jul-13 18:43 
QuestionHow to make my WPF based app remain on top Pin
vonb29-Jul-13 21:14
vonb29-Jul-13 21:14 
AnswerRe: How to make my WPF based app remain on top Pin
Mycroft Holmes29-Jul-13 21:36
professionalMycroft Holmes29-Jul-13 21:36 
GeneralRe: How to make my WPF based app remain on top Pin
vonb29-Jul-13 21:41
vonb29-Jul-13 21: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.