Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

KBou

@KBou
About
Posts
35
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • System.Drawing.Color to System.Windows.Media.Brush
    K KBou

    I Found It.

                System.Windows.Media.BrushConverter bc = new System.Windows.Media.BrushConverter();
                if (\_color.IsNamedColor)
                {
                    ColorBrush = (System.Windows.Media.Brush)bc.ConvertFromString(\_color.Name);
                }
                else
                {
                    ColorBrush = (System.Windows.Media.Brush)bc.ConvertFromString("#"+\_color.Name);
                }
    

    When it is not a NamedColor it returns for example ffffff80. When you add a # it recognizes and converts it. Thanks Anyway

    WPF csharp wpf winforms graphics question

  • System.Drawing.Color to System.Windows.Media.Brush
    K KBou

    The System.Windows.Media.Brush ColorBrush doesn't contain anything like Color or FromArgb. Neither does the BrushConverter.

    WPF csharp wpf winforms graphics question

  • System.Drawing.Color to System.Windows.Media.Brush
    K KBou

    Hi I'm creating a Windows Forms Application with an WPF Element Host. I want to the user to set the background of an WPF element with use of a ColorDialog. So I need to convert the System.Drawing.Color to a System.Windows.Media.Brush. I got it to work when the Color is a NamedColor (isNamedColor) but else I cannot get it to work.

                System.Windows.Media.BrushConverter bc = new System.Windows.Media.BrushConverter();
                if (\_color.IsNamedColor)
                {
                    ColorBrush = (System.Windows.Media.Brush)bc.ConvertFromString(\_color.Name);
                }
                else
                {
                    ???????????
                }
    

    What should I put at the ?????????

    WPF csharp wpf winforms graphics question

  • PropertyGrid
    K KBou

    Well sorry for voting you down but your answer wasn't verry complete and I thought the word Dynamicly made it pretty clear I wasn't looking for a static solution. But we might disagree on that one. Although I found a project in wich it is done (link[^]), this was way to complex for me so I'm using a workaround now. Anyway thanks for your reply. and sorry again for the "down voting".

    C# question

  • PropertyGrid
    K KBou

    Well I think i haven't been very clear. I know this. But I want to change this Dynamicly. By that I mean I wan't to change this at runtime by clicking on a button or something.

    C# question

  • PropertyGrid
    K KBou

    I'n not sure what I'm suppose to do here. When I add [ReadOnly] to my property I get an error. I tried something like [ReadOnly(Foo)] but that not allowed either. Could you give me a bit more described answer. Thanks

    modified on Tuesday, July 1, 2008 4:28 AM

    C# question

  • PropertyGrid
    K KBou

    Hi, I'm using a PropertyGrid on my custom property class. I want to dynamicly set a property to ReadOnly or hide it. How do I do this? Gr.

    C# question

  • PropertyGrid + SelectedObjects
    K KBou

    Hi, I'm using a propertygrid to view properties of my objects. This works fine for when I have one object selected I also got it to work for multiple objects. But my problem is that I have an "Name" property. When I have selected multiple Items I can set the name property. But I don't want to have the same name. I there a way to disable this property in the properygrid only when there are multiple objects selected?? Thanks.

    C# help question

  • PropertyGrid + filepath
    K KBou

    I've allready found it. You have to add the System.Design.dll as a reference. Thanks.

    C# question help

  • PropertyGrid + filepath
    K KBou

    This would be perfect if i could get it to work :D. But the problem is my "System.Windows.Forms.Design" doesn't contain a "FileNameEditor". :doh: I'm I still doing something wrong? Extra info. I'm working with the .net 3.5 framework.

    modified on Friday, June 27, 2008 3:15 AM

    C# question help

  • PropertyGrid + filepath
    K KBou

    Hi, I have a custom class wich contains a string property calles FilePath. When I use this class in my PropertyGrid I want to be able to fill the FilePath with help of a File Dialog. How do I do this??

    C# question help

  • Multiple startup
    K KBou

    Hi, I've build an application but it isn't suppose to startup more than once. How do I prevent my application to startup more than once?? Kevin

    C# question

  • Access Database Information
    K KBou

    How do I get the Maximum Field Length property of a Column in a MS Access Database?

    Visual Basic question database

  • ResourceDictionary
    K KBou

    Hi, I'm trying to add a ResourceDictionary to the Window.Resources. The ResourceDictionary I want to use is in a Class Library I added as a Reference. This is my code: What do I put at the ???????.

    WCF and WF question

  • Space width.
    K KBou

    Thanks. I'll post these thing in the WPF forum the next time. For the Info: I've used the formattedText.WidthIncludingTrailingWhitespace Methode to calculate the width of 1 space.

    C# question

  • Space width.
    K KBou

    Maybe I should have mentioned that I'm creating WPF application and not a WindowsForms application. I have a TextBlock in a ScrollViewer. The ScrollViewer moves it position so you will see another part of the TextBlock. This creates somekind of Marque. At the start I want the text to start off the screen therefor I need the spaces.

    C# question

  • Space width.
    K KBou

    I sounds like it could work. But how do I use it? I can't make a new instance of it, like Graphics g = new Graphics();, And when I just use Graphics. I don't get MeasureString. Can you help me with this.

    C# question

  • Space width.
    K KBou

    "Do you want to replace all text with spaces?" No. The situation is a bit more complex. But lets say the TextBlock is empty and I would want to fill it with spaces. The only data I have is the Width of the TextBlock and the FontSize. If I would know the "width" of a space in the same FontSize I could calculate how many I would need. But how do I calculate the width of a space?

    C# question

  • Space width.
    K KBou

    I've got a TextBlock wich varies in With and FontSize. I want to fill it completely with spaces. How can I calculate how much spaces I need to fill the entire TextBlock? gr. Kevin

    C# question

  • Text Ticker
    K KBou

    Ok Thanks

    WPF csharp wpf help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups