Click here to Skip to main content

Silverlight / WPF

 
QuestionPrinting with more than 96 dpi in WPF [modified] PinmemberMember 45210688-Nov-12 3:22 
AnswerRe: Printing with more than 96 dpi in WPF PinmemberSuper Lloyd14-Nov-12 17:16 
GeneralRe: Printing with more than 96 dpi in WPF [modified] PinmemberMember 452106819-Nov-12 23:26 
QuestionI have issues with the C# WPF WebBrowser class PinmemberXarzu6-Nov-12 21:14 
AnswerRe: I have issues with the C# WPF WebBrowser class PinmemberGerry Schmitz7-Nov-12 12:04 
QuestionBlurry Borderline In FlowDocument PinmemberFocusedWolf6-Nov-12 11:46 
AnswerRe: Blurry Borderline In FlowDocument PinmemberGerry Schmitz7-Nov-12 14:13 
AnswerRe: Blurry Borderline In FlowDocument [modified] PinmemberFocusedWolf7-Nov-12 17:00 
Ok i figured out a way that works, although its a bit ugly:
 
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <FlowDocumentScrollViewer>
        <FlowDocument>
        
            <Paragraph>
                <InlineUIContainer>
                    
                    <Border BorderBrush="Black" BorderThickness="1" Padding="10" SnapsToDevicePixels="True">
                        <Expander>
                            <Expander.Header>
                                <TextBlock Text="An expander" Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Expander}}, Path=ActualWidth}" />
                            </Expander.Header>
                                                
                            <Button>A button</Button>
                        </Expander>                    
                    </Border>
                    
                </InlineUIContainer>
            </Paragraph>
            
        </FlowDocument>
    </FlowDocumentScrollViewer>
</Window>
 
As for why, my code is based on this: http://stackoverflow.com/questions/3798262/how-to-collapse-a-paragraph although i've been improving it. The idea is add or remove a paragraph block below the expander block based on the state of the expander. That + code to handle the copy to clipboard to convert the uielements to text (in this case, getting the header string of the expander) and the result is an interactive flowdocument with collapsing regions and copy support.

modified 7-Nov-12 23:32pm.

QuestionBinding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 9:16 
AnswerRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 9:29 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 9:54 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 10:00 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 10:22 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 10:29 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 10:37 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 10:44 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 11:02 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 11:13 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 11:22 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer6-Nov-12 11:27 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon6-Nov-12 11:28 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer7-Nov-12 4:53 
GeneralRe: Binding in a WPF TreeViewItem PinprotectorPete O'Hanlon7-Nov-12 5:01 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer7-Nov-12 6:24 
GeneralRe: Binding in a WPF TreeViewItem PinmvpJohn Simmons / outlaw programmer8-Nov-12 5:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150301.1 | Last Updated 22 Feb 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid