Click here to Skip to main content
15,887,267 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: How to forward Validation Errors from elements of a UserControl to the UserControl proper Pin
Pete O'Hanlon12-May-15 3:07
mvePete O'Hanlon12-May-15 3:07 
GeneralRe: How to forward Validation Errors from elements of a UserControl to the UserControl proper Pin
Bernhard Hiller12-May-15 3:54
Bernhard Hiller12-May-15 3:54 
GeneralRe: How to forward Validation Errors from elements of a UserControl to the UserControl proper Pin
Pete O'Hanlon12-May-15 3:58
mvePete O'Hanlon12-May-15 3:58 
GeneralRe: How to forward Validation Errors from elements of a UserControl to the UserControl proper Pin
Bernhard Hiller12-May-15 23:45
Bernhard Hiller12-May-15 23:45 
GeneralRe: How to forward Validation Errors from elements of a UserControl to the UserControl proper Pin
Pete O'Hanlon12-May-15 23:49
mvePete O'Hanlon12-May-15 23:49 
AnswerRe: How to forward Validation Errors from elements of a UserControl to the UserControl proper Pin
Bernhard Hiller12-May-15 23:52
Bernhard Hiller12-May-15 23:52 
QuestionWPF UserControl In WinForms Problem Pin
Kevin Marois7-May-15 13:20
professionalKevin Marois7-May-15 13:20 
QuestionConvert This To WPF Pin
Kevin Marois6-May-15 13:44
professionalKevin Marois6-May-15 13:44 
I'm converting parts of a WinForms app to WPF.

This code is a PictureBox that has a circular area in the middle. The Paint event is used to color the circle. Then later a transparent icon is placed over it. The color is user-configurable.

Here's the WinForms control code:
public partial class ucFC6SensorPictureBox : PictureBox
{
    private Color _BackgroundColor = Color.Yellow;
    public Color BackgroundColor
    {
        get
        {
            return _BackgroundColor;
        }
        set
        {
            _BackgroundColor = value;
            Refresh();
        }
    }

    public ucFC6SensorPictureBox()
    {
        InitializeComponent();
    }

    private void ucFC6SensorPictureBox_Paint(object sender, PaintEventArgs e)
    {
        // draw elipse with icon background color
        using (SolidBrush b = new SolidBrush(_BackgroundColor))
        {
            e.Graphics.FillEllipse(b, 1F, 1F, this.ClientRectangle.Width - 2F, this.ClientRectangle.Height - 2F);
        }

        if (Image != null)
        {
            e.Graphics.DrawImage(Image, new Point(0, 0));
        }
    }
}

Mu question is how to do this In WPF.

Thanks
If it's not broken, fix it until it is

AnswerRe: Convert This To WPF Pin
Pete O'Hanlon6-May-15 18:37
mvePete O'Hanlon6-May-15 18:37 
QuestionScrolling Timescale Design Pin
Kevin Marois22-Apr-15 8:21
professionalKevin Marois22-Apr-15 8:21 
AnswerRe: Scrolling Timescale Design Pin
Mycroft Holmes22-Apr-15 14:27
professionalMycroft Holmes22-Apr-15 14:27 
QuestionWPF Timer Threading Exception Pin
Kevin Marois22-Apr-15 6:25
professionalKevin Marois22-Apr-15 6:25 
QuestionProper way to do MouseDoubleClick in MVVM Pin
David Ceder13-Apr-15 3:17
David Ceder13-Apr-15 3:17 
AnswerRe: Proper way to do MouseDoubleClick in MVVM Pin
Mycroft Holmes13-Apr-15 14:34
professionalMycroft Holmes13-Apr-15 14:34 
AnswerRe: Proper way to do MouseDoubleClick in MVVM Pin
SledgeHammer0114-Apr-15 5:02
SledgeHammer0114-Apr-15 5:02 
AnswerRe: Proper way to do MouseDoubleClick in MVVM Pin
Pete O'Hanlon14-Apr-15 6:09
mvePete O'Hanlon14-Apr-15 6:09 
QuestionHow can we change date in datepicker on selecting different country culture in combo box in MVVM? Pin
Member 1142836713-Apr-15 0:05
Member 1142836713-Apr-15 0:05 
AnswerRe: How can we change date in datepicker on selecting different country culture in combo box in MVVM? Pin
Pete O'Hanlon13-Apr-15 0:42
mvePete O'Hanlon13-Apr-15 0:42 
GeneralRe: How can we change date in datepicker on selecting different country culture in combo box in MVVM? Pin
Member 1142836714-Apr-15 18:16
Member 1142836714-Apr-15 18:16 
QuestionMFC CDialog hosting WPF components Pin
Member 88339813-Apr-15 4:34
Member 88339813-Apr-15 4:34 
QuestionDataGridComboBoxColumn - Combo Doesn't Show Pin
Kevin Marois1-Apr-15 8:57
professionalKevin Marois1-Apr-15 8:57 
AnswerRe: DataGridComboBoxColumn - Combo Doesn't Show Pin
Mycroft Holmes1-Apr-15 14:23
professionalMycroft Holmes1-Apr-15 14:23 
AnswerRe: EF Autoupdate Pin
Mycroft Holmes1-Apr-15 14:18
professionalMycroft Holmes1-Apr-15 14:18 
GeneralRe: EF Autoupdate Pin
Mycroft Holmes6-Apr-15 12:38
professionalMycroft Holmes6-Apr-15 12:38 
QuestionWPF migration frame work 3.5 to 4.5 framework Pin
karthikchinnu30-Mar-15 8:37
karthikchinnu30-Mar-15 8:37 

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.