Click here to Skip to main content
15,116,516 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF application displays differently in Windows 7 and Windows 10 Pin
jimmson27-Aug-19 22:53
Memberjimmson27-Aug-19 22:53 
GeneralRe: WPF application displays differently in Windows 7 and Windows 10 Pin
Jakob Farian Krarup28-Aug-19 2:25
MemberJakob Farian Krarup28-Aug-19 2:25 
AnswerRe: WPF application displays differently in Windows 7 and Windows 10 Pin
Gerry Schmitz28-Aug-19 4:10
mveGerry Schmitz28-Aug-19 4:10 
GeneralRe: WPF application displays differently in Windows 7 and Windows 10 Pin
Jakob Farian Krarup28-Aug-19 23:31
MemberJakob Farian Krarup28-Aug-19 23:31 
QuestionWPF and Windows Forms at same time. Pin
michaelbarb15-Aug-19 6:12
Membermichaelbarb15-Aug-19 6:12 
AnswerRe: WPF and Windows Forms at same time. Pin
Pete O'Hanlon15-Aug-19 6:39
mvePete O'Hanlon15-Aug-19 6:39 
GeneralRe: WPF and Windows Forms at same time. Pin
michaelbarb15-Aug-19 7:15
Membermichaelbarb15-Aug-19 7:15 
QuestionEnregistrer en RTF un RichTextBox / Save RTF RichTextBox Pin
dctc334-Aug-19 0:00
Memberdctc334-Aug-19 0:00 
bonjour,
J'ai un RichTextBox dans le quel il y a un FlowDocument

je crée un tableau par code

le tableau s'affiche correctement
je le sauvegarde en RTF .
je perds les mises en forme
seul le Background est bon

Merci de votre réponse

un bout du code


Google Translate:
Hello,
I have a RichTextBox in which there is a FlowDocument

I create a table by code

the table is displayed correctly
I save it in RTF.
I lose the formatting
only the Background is good

Thank you for your reply

a piece of code


C#
private void button2_Click_1(object sender, RoutedEventArgs e)
        {
          
             Table T = new Table();
            
            myFlowDoc.Blocks.Add(T);
            T.CellSpacing = 1;
        
          
            for (int x = 0;x<5;x++) { T.Columns.Add(new TableColumn()); }
            T.Columns[0].Background = Brushes.Beige;
            T.Columns[0].Width = new GridLength(200);
            T.Columns[1].Width = new GridLength(150);
            T.Columns[2].Width = new GridLength(60);
            T.Columns[3].Width = new GridLength(100);
            T.Columns[4].Width = new GridLength(100);


            T.BorderThickness = new Thickness(1);
            T.BorderBrush = Brushes.Red;
           

            T.RowGroups.Add(new TableRowGroup());
            T.RowGroups[0].Rows.Add(new TableRow());  // ajout titre

            TableRow currentRow = T.RowGroups[0].Rows[0];
            currentRow.FontWeight = FontWeights.Bold;

            currentRow.Background = Brushes.Silver;    /// ok
            
            currentRow.FontSize = 20;
 

            TableCell TC = new TableCell();
           
            currentRow.Cells.Add(TC);
            TC.TextAlignment = TextAlignment.Center;
            myParagraph = new Paragraph(new Run("Résultat des mesures "));
       

            TC.Blocks.Add(myParagraph);

AnswerRe: Enregistrer en RTF un RichTextBox / Save RTF RichTextBox Pin
OriginalGriff4-Aug-19 0:05
mveOriginalGriff4-Aug-19 0:05 
AnswerRe: Enregistrer en RTF un RichTextBox / Save RTF RichTextBox Pin
Gerry Schmitz4-Aug-19 7:51
mveGerry Schmitz4-Aug-19 7:51 
GeneralRe: Enregistrer en RTF un RichTextBox / Save RTF RichTextBox Pin
dctc336-Aug-19 0:54
Memberdctc336-Aug-19 0:54 
GeneralRe: Enregistrer en RTF un RichTextBox / Save RTF RichTextBox Pin
Gerry Schmitz6-Aug-19 5:56
mveGerry Schmitz6-Aug-19 5:56 
QuestionListBox - Validate One or More Selections Pin
Kevin Marois22-Jul-19 10:30
professionalKevin Marois22-Jul-19 10:30 
QuestionWPF DataTemplateSelector Question Pin
Kevin Marois18-Jul-19 20:44
professionalKevin Marois18-Jul-19 20:44 
AnswerRe: WPF DataTemplateSelector Question Pin
Richard Deeming19-Jul-19 2:07
mveRichard Deeming19-Jul-19 2:07 
GeneralRe: WPF DataTemplateSelector Question Pin
Kevin Marois19-Jul-19 17:01
professionalKevin Marois19-Jul-19 17:01 
GeneralRe: WPF DataTemplateSelector Question Pin
Kevin Marois19-Jul-19 17:39
professionalKevin Marois19-Jul-19 17:39 
AnswerWPF ListBox Drag and drop Security elevation issue. Pin
Alisaunder12-Jun-19 17:13
MemberAlisaunder12-Jun-19 17:13 
QuestionUser Control - Dependancy property MVVM Pin
MichaelLuna10-Jun-19 15:33
MemberMichaelLuna10-Jun-19 15:33 
QuestionContentPresenter and ghost Views\ViewModels Pin
F4r145-Jun-19 1:29
MemberF4r145-Jun-19 1:29 
AnswerRe: ContentPresenter and ghost Views\ViewModels Pin
Gerry Schmitz5-Jun-19 7:40
mveGerry Schmitz5-Jun-19 7:40 
GeneralRe: ContentPresenter and ghost Views\ViewModels Pin
F4r145-Jun-19 10:22
MemberF4r145-Jun-19 10:22 
GeneralRe: ContentPresenter and ghost Views\ViewModels Pin
Gerry Schmitz6-Jun-19 6:47
mveGerry Schmitz6-Jun-19 6:47 
Questiondeployment size with WPF on .NET Core Pin
Super Lloyd2-Jun-19 15:47
MemberSuper Lloyd2-Jun-19 15:47 
AnswerRe: deployment size with WPF on .NET Core Pin
Mycroft Holmes2-Jun-19 17:02
professionalMycroft Holmes2-Jun-19 17:02 

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.