Click here to Skip to main content
15,921,622 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: .Net remoting Pin
Helfdane13-Apr-11 9:17
Helfdane13-Apr-11 9:17 
GeneralRe: .Net remoting Pin
jschell14-Apr-11 9:12
jschell14-Apr-11 9:12 
GeneralRe: .Net remoting Pin
Helfdane15-Apr-11 7:38
Helfdane15-Apr-11 7:38 
GeneralRe: .Net remoting Pin
jschell15-Apr-11 8:54
jschell15-Apr-11 8:54 
GeneralRe: .Net remoting Pin
Helfdane15-Apr-11 11:43
Helfdane15-Apr-11 11:43 
GeneralRe: .Net remoting Pin
jschell16-Apr-11 11:08
jschell16-Apr-11 11:08 
GeneralRe: .Net remoting Pin
jschell16-Apr-11 11:28
jschell16-Apr-11 11:28 
QuestionInitialize Textblock after changing Inlines [modified] Pin
Defender-NF11-Apr-11 10:52
Defender-NF11-Apr-11 10:52 
Hello everyone

Since Inlines (CollectionInlines) arnt a dependencyproperty i made a TextBox with dependency Inlines, the Code:

public InlineCollection InlineCollection
       {
           get
           {
               return (InlineCollection)GetValue(InlineCollectionProperty);
           }
           set
           {
               SetValue(InlineCollectionProperty, value);
           }
       }

       public static readonly DependencyProperty InlineCollectionProperty = DependencyProperty.Register(
           "InlineCollection",
           typeof(InlineCollection),
           typeof(InlineTextBlock),
               new UIPropertyMetadata((PropertyChangedCallback)((sender, args) =>
               {
                   InlineTextBlock textBlock = sender as InlineTextBlock;

                   if (textBlock != null)
                   {


                       textBlock.Inlines.Clear();

                       InlineCollection inlines = args.NewValue as InlineCollection;
                       InlineCollection oldinlines = args.OldValue as InlineCollection;

                       if (inlines != null)
                       {
                           textBlock.Inlines.AddRange(inlines.ToList());
                       }

                       else

                           textBlock.Inlines.AddRange(oldinlines.ToList());



                   }
               })));


The TextBlock has normally some text after that it gets new inlines, if the Inlines it gets are empty it should get its first(default) text again. Now the Problem:
if it had a the first a text via Inlines then everything is ok coz i can get them again with the oldvalue, if it has a the first normal text with no inlines then the textblock doesnt show nothing because of: textBlock.Inlines.AddRange(oldinlines.ToList()); (no oldvalue of the Inlines)
how can i set the first text at the ende if in this case? any ideas?

Thanks in Advance.

Cheers

Def.

modified on Tuesday, April 12, 2011 9:02 AM

QuestionChanging the database of a typed DataSet after generation Pin
Jean-Louis Leroy6-Apr-11 22:54
Jean-Louis Leroy6-Apr-11 22:54 
AnswerRe: Changing the database of a typed DataSet after generation Pin
Dave Kreskowiak7-Apr-11 2:06
mveDave Kreskowiak7-Apr-11 2:06 
QuestionSystem.io equivalent of java.io.FileOutputStream Pin
codeproj_priya5-Apr-11 23:44
codeproj_priya5-Apr-11 23:44 
AnswerRe: System.io equivalent of java.io.FileOutputStream Pin
Pete O'Hanlon5-Apr-11 23:53
mvePete O'Hanlon5-Apr-11 23:53 
QuestionForm MouseLeave event [modified] Pin
TyrionTheImp5-Apr-11 20:06
TyrionTheImp5-Apr-11 20:06 
AnswerRe: Form MouseLeave event Pin
RobCroll5-Apr-11 22:53
RobCroll5-Apr-11 22:53 
GeneralRe: Form MouseLeave event Pin
TyrionTheImp5-Apr-11 23:17
TyrionTheImp5-Apr-11 23:17 
AnswerRe: Form MouseLeave event Pin
Luc Pattyn5-Apr-11 23:56
sitebuilderLuc Pattyn5-Apr-11 23:56 
GeneralRe: Form MouseLeave event Pin
TyrionTheImp11-Apr-11 5:52
TyrionTheImp11-Apr-11 5:52 
GeneralRe: Form MouseLeave event Pin
RobCroll6-Apr-11 17:36
RobCroll6-Apr-11 17:36 
GeneralRe: Form MouseLeave event Pin
TyrionTheImp11-Apr-11 5:58
TyrionTheImp11-Apr-11 5:58 
AnswerRe: Form MouseLeave event Pin
Ravi Bhavnani8-Apr-11 9:43
professionalRavi Bhavnani8-Apr-11 9:43 
GeneralRe: Form MouseLeave event Pin
TyrionTheImp11-Apr-11 6:00
TyrionTheImp11-Apr-11 6:00 
Questioncode Pin
dhruty4-Apr-11 20:49
dhruty4-Apr-11 20:49 
AnswerRe: code Pin
Pete O'Hanlon4-Apr-11 20:50
mvePete O'Hanlon4-Apr-11 20:50 
AnswerRe: code Pin
Abhinav S4-Apr-11 22:07
Abhinav S4-Apr-11 22:07 
AnswerRe: code Pin
dan!sh 4-Apr-11 22:33
professional dan!sh 4-Apr-11 22:33 

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.