Click here to Skip to main content
15,894,180 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Error calling wcf service Pin
nitin_ion6-Apr-10 23:16
nitin_ion6-Apr-10 23:16 
AnswerRe: Error calling wcf service Pin
Abhinav S7-Apr-10 4:27
Abhinav S7-Apr-10 4:27 
GeneralRe: Error calling wcf service Pin
nitin_ion7-Apr-10 17:20
nitin_ion7-Apr-10 17:20 
GeneralRe: Error calling wcf service [modified] Pin
Abhinav S7-Apr-10 18:31
Abhinav S7-Apr-10 18:31 
QuestionCustomizing appearance of user-control property in 'Properties' panel [modified] Pin
Prasoon Chaudhary6-Apr-10 21:40
Prasoon Chaudhary6-Apr-10 21:40 
AnswerRe: Customizing appearance of user-control property in 'Properties' panel Pin
Sevententh7-Apr-10 1:01
Sevententh7-Apr-10 1:01 
GeneralRe: Customizing appearance of user-control property in 'Properties' panel Pin
Prasoon Chaudhary7-Apr-10 1:17
Prasoon Chaudhary7-Apr-10 1:17 
AnswerRe: Customizing appearance of user-control property in 'Properties' panel [modified] Pin
Sevententh7-Apr-10 1:38
Sevententh7-Apr-10 1:38 
Oh OK, I did something similar with a control for visibility of the Toolbar. It would be the very similar.

You need to set yourself up a public Enum for your types of Border
public enum BorderTypes
{
    // Summary:
    //     Display the border as thick.
    Thick = 0,
    //
    // Summary:
    //     Display the border as thin.
    Thin = 1,
    //
    // Summary:
    //     Display the border as thinner.
    Thinner = 2,
    //
    // Summary:
    //     Do not display the border.
    None= 3,
}

Now I think this should work for you (fingers crossed)
#region BorderThicknessProperty DP

/// <summary>
/// Bound Data Dependency Property
/// </summary>
public static readonly DependencyProperty myBorderThicknessProperty =
    DependencyProperty.Register("myBorderThickness", typeof(BorderTypes), typeof(TestControl),
        new FrameworkPropertyMetadata(BorderTypes.Thick, new PropertyChangedCallback(OnBorderThicknessPropertyChanged)));

/// <summary>
/// Gets or sets the Bound Data property.
/// </summary>
public BorderTypes myBorderThickness
{
    get { return (BorderTypes)GetValue(myBorderThicknessProperty); }
    set { SetValue(myBorderThicknessProperty, value); }
}

/// <summary>
/// Handles changes to the ToolbarVisibility property.
/// </summary>
private static void OnBorderThicknessPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
    BorderTypes ds = (BorderTypes)e.NewValue;
    //Use a switch to set the thickness
    switch (ds)
    {
        case BorderTypes.Thick :
            {
                ((TestControl)d).<Name of your control here to set the border thickness on>.BorderThickness = 10;
            }
            break;
    }
}

#endregion

modified on Thursday, April 8, 2010 4:16 AM

GeneralRe: Customizing appearance of user-control property in 'Properties' panel [Solved] Pin
Prasoon Chaudhary7-Apr-10 19:40
Prasoon Chaudhary7-Apr-10 19:40 
QuestionScrollbar on silverlight UserControl [SOLVED] Pin
#realJSOP6-Apr-10 8:10
mve#realJSOP6-Apr-10 8:10 
QuestionWPF Combobox Pin
koleraba6-Apr-10 8:04
koleraba6-Apr-10 8:04 
AnswerRe: WPF Combobox Pin
vsaratkar6-Apr-10 10:23
vsaratkar6-Apr-10 10:23 
GeneralRe: WPF Combobox Pin
koleraba6-Apr-10 12:01
koleraba6-Apr-10 12:01 
QuestionChanging Button Programatically [SLVED, but still accepting input/comments] Pin
#realJSOP6-Apr-10 7:49
mve#realJSOP6-Apr-10 7:49 
AnswerRe: Changing Button Programatically [SLVED, but still accepting input/comments] Pin
Pete O'Hanlon6-Apr-10 9:17
mvePete O'Hanlon6-Apr-10 9:17 
AnswerRe: Changing Button Programatically [SLVED, but still accepting input/comments] Pin
Michael J. Eber19-Apr-10 11:49
Michael J. Eber19-Apr-10 11:49 
QuestionChart ToolKit error in WPF Pin
Nanda_MR6-Apr-10 1:36
Nanda_MR6-Apr-10 1:36 
Questionwpf menu errors in XP Pin
hb521342145-Apr-10 13:24
hb521342145-Apr-10 13:24 
AnswerRe: wpf menu errors in XP Pin
hb521342145-Apr-10 13:54
hb521342145-Apr-10 13:54 
QuestionContext Menu Pin
ScottRadel5-Apr-10 12:09
ScottRadel5-Apr-10 12:09 
AnswerRe: Context Menu Pin
hb521342145-Apr-10 13:56
hb521342145-Apr-10 13:56 
GeneralRe: Context Menu Pin
ScottRadel6-Apr-10 8:21
ScottRadel6-Apr-10 8:21 
QuestionSetting a Style Programatically [modified] Pin
#realJSOP5-Apr-10 9:36
mve#realJSOP5-Apr-10 9:36 
AnswerRe: Setting a Style Programatically Pin
Pete O'Hanlon5-Apr-10 10:46
mvePete O'Hanlon5-Apr-10 10:46 
GeneralRe: Setting a Style Programatically Pin
#realJSOP5-Apr-10 12:14
mve#realJSOP5-Apr-10 12:14 

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.