custom-controls

How to create a custom control which can scroll with a fixed row and column?

醉酒当歌 提交于 2020-01-01 09:57:15
问题 I'm trying to figure out how I can make a custom control in a way where user can scroll in all directions, but with a fixed row and column. A grid is not suitable for what I'm trying to do, because it scrolls column by column. I need horizontal scrolling to be smooth, pixel by pixel. I have no use for columns, only visual grid lines. Vertical scrolling should scroll not only the area on the right, but also the fixed region on the left. Same with horizontal scrolling: the header row should

WPF CustomControl: OnApplyTemplate called after PropertyChangedCallback

眉间皱痕 提交于 2020-01-01 03:01:08
问题 I am creating a WPF CustomControl that has a dependency property with PropertyChangedCallback. In that Callback method I try to set values on some of the control's parts that I retrieve from OnApplyMethod using the GetTemplateChild() method. The problem is that the PropertyChangedCallback is (on some systems) called before OnApplyTemplate so the control parts are still null. The workaround I'm currently using is to save e.NewValue from the PropertyChangedCallback to a member variable and then

Create a custom Full sized Calendar Control [closed]

北城余情 提交于 2020-01-01 01:10:48
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . How can I make a custom control that show the calendar control in a much larger view. Like this or like the calendar view in outlook 2007. Do I have to make a custom class or can I just attempt to resize the

inno setup custom page with checkbox and dropdown list

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-01 00:48:09
问题 Is it possible to have a custom page with a drop down list, check boxes, and a button possibly changing the check boxes based on what is chosen from the drop down list. The button will just be used to display a readme text file. I am really not familiar with python scripting but have managed to create a drop down list. 回答1: You might take a script like this as an inspiration: [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}\My Program OutputDir=userdocs:Inno Setup Examples Output

Override AutoSize for derived Label Control in C#

微笑、不失礼 提交于 2019-12-31 06:28:56
问题 I am trying to extend the System.Windows.Forms.Label class to support vertically drawn text. I do this by creating a new property called MyLabelOrientation that the user can set to Horizontal or Vertical. When the user changes this setting, the values for width and height are swapped to resize the control to its new orientation. Finally, I override the OnPaint function to draw my Label. I would like to extend the AutoSize property for this control as well so that my Label will auto-size to

How to Access a Button present inside a Custom Control, from the implementing page?

你。 提交于 2019-12-31 02:35:31
问题 I have my generic.xaml containing the following code: <ControlTemplate TargetType="local:customVideoControl"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="600"/> <RowDefinition Height="200"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="200"/> <ColumnDefinition Width="200"/> <ColumnDefinition Width="200"/> </Grid.ColumnDefinitions> <MediaElement x:Name="customMediaPlayer" Source="{TemplateBinding CustomMediaSource}" HorizontalAlignment="Center"

Implementing a gauge control with UIKit on the iPhone

江枫思渺然 提交于 2019-12-30 14:49:22
问题 For an application I'm working on, I'd like to implement sort of a gauge-like control. The gauge should be of vertical orientation and I'd like to get the effect of a dial with the values printed on it to move vertically so that the current value appears at the center of the gauge. While the part of the dial that is not currently visible gets clipped. I thought a good approach would be to have one UIView that acts as the top visible part (the gauge's window if you will) and a subview that

WPF tab order with custom controls?

徘徊边缘 提交于 2019-12-30 10:38:31
问题 I have a WPF page that contains several out of the box controls with the tab order set. I have a custom control (NumericSpinner) that contains: border/grid/text box/2 Repeatbuttons (up/down). Two issues: 1) when I am in the textbox for the custom selector control, I cannot tab out of it to other controls on the page. However after clicking on one of the up/down arrows, I am able to tab over to other controls. 2) I am unable to tab into the textbox of the custom control in order. It is only

Overriding init() in a CustomUIView crashes app (EXC_BAD ACCESS)

Deadly 提交于 2019-12-30 08:11:39
问题 I am trying to subclass a UIView in Swift. Howver the app crashes (EXC_BAD_ACCESS) when the initializer is called Here is the class class CustomActionSheet: UIView { private var cancelButtonTitle: String!; private var destructiveButtonTitle: String!; private var otherButtonTitles: [String]!; convenience init() { self.init();//EXC_BAD_ACCESS } required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder); } convenience init(cancelButtonTitle: String!, destructiveButtonTitle: String!,

Enabling design surface on Winforms custom UserControl

我们两清 提交于 2019-12-30 07:30:27
问题 I tried to create a custom user control in C# that handles other controls that are added to it. The custom control consists of two panels. What I'm trying to achieve is, that if another control is dragged to my user control in design mode (or added programmatically at runtime) I want that control to be placed on one of the panels. I tried to handle the OnControlAdded event but that didn't do the trick... 回答1: Markus wrote : "if another control is dragged to my user control in design mode (or