I have defined a Control with:
static member ItemsProperty : DependencyProperty =
DependencyProperty.Register(
"Items",
typeof<MyMenuItemCollection>,
typeof<MyMenu>,
null);
member this.Items
with get () : MyMenuItemCollection = this.GetValue(MyMenu.ItemsProperty) :?> My...
Hi all,
I have created a custom control inheriting from a panel in .NET 3.5
The panel has a custom polygon border, which comes from a pointF array (In diagram, control is highlighted yellow).
Fig 1 shows the control with BorderStyle none. Fig 2 with BorderStyle fixed-single
As shown in Fig 2, the border follows the Rectangle bounding...
I'm creating a custom control, and I want to get all the stuff within the tags and use it as a string Text field on my control:
i.e.
<custom:control ID="C" runat="server">This text should go into the text property</custom:control>
Does anyone know how to achieve this? I've tried the following attributes on my text field (copied from ...
I need to configure a property of a custom control I wrote, specifically before the control calls OnInit. If I assign it as part of the ASPX file, it naturally works, but if I instead move the assignment to different parts of the code-behind, it will throw an error for having an empty and invalid value. The following is what it looks lik...
I have the need for an ASP.NET custom server control that will check the web.config file for a connectionstring name, prompt the user to create said connectionstring if not present, and execute create table stored procedures using the connection. This control will be embedded into a webpart for use in a WSS3.0 solution.
Can anyone su...
ok, I'm working on a custom control that can contain some javascript, and read this out of the page into a string field.
This is a workaround for dynamic javascript inside an updatepanel.
At the moment, I've got it working, but if I try to put a server tag inside the block:
<custom:control ID="Custom" runat="server">
<%= ControlNa...
Hello,
I have creating a custom datagridviewcell where i have implementing the editing control mode to show a custom control.
this is my code :
public class MonthCalendarCell : DataGridViewImageCell
{
public DateTime date { get; set; }
public MonthPanelEvent panelEvent { get; set; }
public MonthCalendarCell() : base()
...
I have ScrollableControl inheritor and i want to draw elements (like header) which are not scrollable during scrolling.
Is there any solution?
...
MainWindow.xaml
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:my="clr-namespace:MyStuff;assembly=MyStuff"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TabControl Margin="5">
...
Hello,
currently I develop a C#.Net application in which I'm using a custom control I developed some time ago. I need the dll to be shipped within the new application - but understandably I do not want the dll file to be used for foreign apps.
That's why I need the custom dll to be somehow compiled within the new application. Currentl...
What options do I have to automate tests for the various aspects of my custom WPF controls, such as:
Layout behavior
input and user interaction behavior
general apperance
...
I have created a WindowsFormControlLibrary porject. It works fine, I can drop it on the forms,call its methods,etc ...
but now as a property of it, I am passing the name of a Label to it. and I want this custom control to be able to use that label name and for example change its font to bold .
so the question is that if I have a WinForm...
I have created a custom combobox that has a LABEL property so when we drop it on a form, we can say the Label associated with this ComboBox is say Label2
this is what I wrote for its label property.
The whole thing I want to do is that when I am assigning the Label property of my custom ComboBox to one of the labels on the form, I want t...
Hi,
I have an object Trip in my object model containing a list of Nodes (e.g. NodeName, StartDate and EndDate) and I am trying to build a Custom control in WPF that draws list of rectangles: one for each Node contained in the Trip object (based on StartDate en EndDate)
Would you have any hint on how the Custom Control should be structur...
I have a problem, and I have not found the solution yet. I woud like to create a base custom control and use it in another custom control. The base control works fine when I use it in a window, but when I use it in the other custom control, the binding does not work.
What's wrong with my code?
Code:
Model:
public class ElementModel
{...
I'm not sure why this is doing this, but I can't access the resource from within my constructor.
XTabItem.cs
using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace MyStuff
{
public class XTabItem : TabItem
{
public static readonly Dependency...
I am planning on writing a hierarchical organizational control, similar to an org chart. Several org chart implementations are out there, but not quite fit what I have in mind.
Binding fields in a DataTemplate to a custom object does not seem to work.
I started with a generic, custom control, i.e.
public class NodeBodyBlock : ContentC...
I want to design a custom Control for Line (vertical or horizontal line)
basic usercontrol is rectangle and not suitable for line
what s your idea about line control?
...
Hello Experts,
I am Beginner. I want to study and create custom controls. I have searched on Google but didn't find any good stuff.
Could anybody provide me some nice link or explain me that how can I start custom controls.
Thanks in advance.
...
I've been trying to create a special kind of fieldset. Which does all kind of fantastic things, but mainly collapse and maintain state. Also the two parts of the fieldset (in the legend, and in the rest) must be available to code behind (declaratively).
The code in the consuming page or control should look something like this:
<myTagPr...