Click here to Skip to main content
12,814,411 members (35,793 online)

Silverlight / WPF

 
QuestionPrinting with more than 96 dpi in WPF Pin
Member 45210688-Nov-12 3:22
memberMember 45210688-Nov-12 3:22 
AnswerRe: Printing with more than 96 dpi in WPF Pin
Super Lloyd14-Nov-12 17:16
memberSuper Lloyd14-Nov-12 17:16 
GeneralRe: Printing with more than 96 dpi in WPF Pin
Member 452106819-Nov-12 23:26
memberMember 452106819-Nov-12 23:26 
QuestionI have issues with the C# WPF WebBrowser class Pin
Xarzu6-Nov-12 21:14
memberXarzu6-Nov-12 21:14 
AnswerRe: I have issues with the C# WPF WebBrowser class Pin
Gerry Schmitz7-Nov-12 12:04
memberGerry Schmitz7-Nov-12 12:04 
QuestionBlurry Borderline In FlowDocument Pin
FocusedWolf6-Nov-12 11:46
memberFocusedWolf6-Nov-12 11:46 
AnswerRe: Blurry Borderline In FlowDocument Pin
Gerry Schmitz7-Nov-12 14:13
memberGerry Schmitz7-Nov-12 14:13 
AnswerRe: Blurry Borderline In FlowDocument Pin
FocusedWolf7-Nov-12 17:00
memberFocusedWolf7-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 Pin
John Simmons / outlaw programmer6-Nov-12 9:16
mvpJohn Simmons / outlaw programmer6-Nov-12 9:16 
AnswerRe: Binding in a WPF TreeViewItem Pin
Pete O'Hanlon6-Nov-12 9:29
protectorPete O'Hanlon6-Nov-12 9:29 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer6-Nov-12 9:54
mvpJohn Simmons / outlaw programmer6-Nov-12 9:54 
GeneralRe: Binding in a WPF TreeViewItem Pin
Pete O'Hanlon6-Nov-12 10:00
protectorPete O'Hanlon6-Nov-12 10:00 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer6-Nov-12 10:22
mvpJohn Simmons / outlaw programmer6-Nov-12 10:22 
GeneralRe: Binding in a WPF TreeViewItem Pin
Pete O'Hanlon6-Nov-12 10:29
protectorPete O'Hanlon6-Nov-12 10:29 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer6-Nov-12 10:37
mvpJohn Simmons / outlaw programmer6-Nov-12 10:37 
GeneralRe: Binding in a WPF TreeViewItem Pin
Pete O'Hanlon6-Nov-12 10:44
protectorPete O'Hanlon6-Nov-12 10:44 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer6-Nov-12 11:02
mvpJohn Simmons / outlaw programmer6-Nov-12 11:02 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer6-Nov-12 11:13
mvpJohn Simmons / outlaw programmer6-Nov-12 11:13 
GeneralRe: Binding in a WPF TreeViewItem Pin
Pete O'Hanlon6-Nov-12 11:22
protectorPete O'Hanlon6-Nov-12 11:22 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer6-Nov-12 11:27
mvpJohn Simmons / outlaw programmer6-Nov-12 11:27 
GeneralRe: Binding in a WPF TreeViewItem Pin
Pete O'Hanlon6-Nov-12 11:28
protectorPete O'Hanlon6-Nov-12 11:28 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer7-Nov-12 4:53
mvpJohn Simmons / outlaw programmer7-Nov-12 4:53 
GeneralRe: Binding in a WPF TreeViewItem Pin
Pete O'Hanlon7-Nov-12 5:01
protectorPete O'Hanlon7-Nov-12 5:01 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer7-Nov-12 6:24
mvpJohn Simmons / outlaw programmer7-Nov-12 6:24 
GeneralRe: Binding in a WPF TreeViewItem Pin
John Simmons / outlaw programmer8-Nov-12 5:30
mvpJohn Simmons / outlaw programmer8-Nov-12 5:30 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 20 Mar 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid