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

.NET (Core and Framework)

 
AnswerRe: .net freelancer Pin
Eddy Vluggen12-Oct-16 7:05
professionalEddy Vluggen12-Oct-16 7:05 
QuestionNested Components - Winforms Pin
Midi_Mick10-Oct-16 6:47
professionalMidi_Mick10-Oct-16 6:47 
AnswerRe: Nested Components - Winforms Pin
Midi_Mick11-Oct-16 0:24
professionalMidi_Mick11-Oct-16 0:24 
QuestionLife of IDisposable object members Pin
Midi_Mick2-Oct-16 7:25
professionalMidi_Mick2-Oct-16 7:25 
AnswerRe: Life of IDisposable object members Pin
Nathan Minier3-Oct-16 1:28
professionalNathan Minier3-Oct-16 1:28 
GeneralRe: Life of IDisposable object members Pin
Midi_Mick3-Oct-16 1:41
professionalMidi_Mick3-Oct-16 1:41 
GeneralRe: Life of IDisposable object members Pin
Nathan Minier3-Oct-16 1:46
professionalNathan Minier3-Oct-16 1:46 
QuestionControl Designers Pin
Midi_Mick27-Sep-16 4:02
professionalMidi_Mick27-Sep-16 4:02 
I have just spent the last 2 days using language I thought I had forgotten - all in reference to Microsoft's decision to declare all their ControlDesigners as Internal. All I am trying to do is inherit some controls from standard controls, and use a ControlDesigner to make their size fixed in one direction or the other. Most will be fixed height or fixed width panels but there are a couple of other controls I'd like to play with in this way also. Overriding the SetCoreBounds method, and the Width, Height, and Size properties to make them all operationally ok has been simple enough, and I have that all working. I just personally think that if a control has a fixed height or width, then it shouldn't show the corresponding sizing handles.

I have created basic ControlDesigners that do this perfectly, all following the pattern below:
C#
class FixedHeightControlDesigner : ControlDesigner {
    FixedHeightControlDesigner() {
        AutoResizeHandles = true;
    }
    public override SelectionRules SelectionRules {
        get {
            return SelectionRules.LeftSizeable | SelectionRules.RightSizeable | SelectionRules.Moveable;
        }
    }
}

I have also created designers with this pattern that inherit from ParentControlDesigner and ScrollableControlDesigner for controls that require those sorts of properties.

The problem is, when I apply this designer to an Inherited control, that control's normal designer is replaced. This means that I don't get the nice little dotted lines around a Panel, or the popup property editors on controls like the ListView or TabControl.

Life would be so much simpler if I could inherit directly from classes like the PanelDesigner, ListViewDesigner, or TabControlDesigner directly, and just add my little SelectionRules override to that. But I can't.Mad | :mad:

At the moment, the only solution I can see is to copy the source for these Designers, rename them, and pop my snippet in there (not the way the concept of code re-use was envisioned, I'm sure). If anyone can think of a better way, I'd be wrapped.
Cheers,

Mick
------------------------------------------------
It doesn't matter how often or hard you fall on your arse, eventually you'll roll over and land on your feet.

AnswerRe: Control Designers Pin
Gerry Schmitz28-Sep-16 13:26
mveGerry Schmitz28-Sep-16 13:26 
Questioninteroperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 5:44
professionalachimschoen22-Sep-16 5:44 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
NotPolitcallyCorrect22-Sep-16 6:29
NotPolitcallyCorrect22-Sep-16 6:29 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 6:44
professionalachimschoen22-Sep-16 6:44 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
NotPolitcallyCorrect22-Sep-16 7:02
NotPolitcallyCorrect22-Sep-16 7:02 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 22:09
professionalachimschoen22-Sep-16 22:09 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
#realJSOP22-Sep-16 6:41
mve#realJSOP22-Sep-16 6:41 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Gerry Schmitz22-Sep-16 7:12
mveGerry Schmitz22-Sep-16 7:12 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 22:17
professionalachimschoen22-Sep-16 22:17 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Gerry Schmitz24-Sep-16 6:16
mveGerry Schmitz24-Sep-16 6:16 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Bernhard Hiller22-Sep-16 21:02
Bernhard Hiller22-Sep-16 21:02 
AnswerRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Pete O'Hanlon22-Sep-16 21:41
mvePete O'Hanlon22-Sep-16 21:41 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
achimschoen22-Sep-16 21:57
professionalachimschoen22-Sep-16 21:57 
GeneralRe: interoperation / Loading and unloading WPF assembly from arbitrary path Pin
Pete O'Hanlon23-Sep-16 2:29
mvePete O'Hanlon23-Sep-16 2:29 
QuestionTcpClient timeout delay Pin
Member 1263260115-Sep-16 19:50
Member 1263260115-Sep-16 19:50 
QuestionRe: TcpClient timeout delay Pin
Richard MacCutchan15-Sep-16 22:38
mveRichard MacCutchan15-Sep-16 22:38 
AnswerRe: TcpClient timeout delay Pin
Member 1263260115-Sep-16 22:50
Member 1263260115-Sep-16 22:50 

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.