In a window of my WPF application I have a number of objects which dirived from a custom control:
...
<MyNamespace:MyCustControl x:Name="x4y3" />
<MyNamespace:MyCustControl x:Name="x4y4" />
<MyNamespace:MyCustControl x:Name="x4y5" />
<MyNamespace:MyCustControl x:Name="x4y6" />
<MyNamespace:MyCustControl x:Name="x4y7" />
...
In my code...
I've made a custom control that inherits from a Literal control. When I try and use my control on a page a parsing error is thrown. I've added this to my web.config
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="one" namespace="myApplication.Controls"/>
</controls>
</pages>
</system.web>
...
Hi,
I'm implementing my own fake tabcontrol to look like IE8-tabs (I'm aware of other implementations of tabcontrol).
My TabControl derives from Selector, and my TabItems derive from ContentControl.
When a tab is selected i set IsSelected (a dependencyproperty) to true.
My trigger looks like this:
<Trigger Property="IsSelected" Value=...
When building a custom control, how would you access the content between the opening and closing control tags?
<my:tag runat="server">
<p>...markup</p>...
</my:tag>
I am currently successfully using the Render method to output arbitrary markeup, but cannot seem to find out how to access the contained markup.
...
In a custom server control, I am simply writing out the number of child controls.
Is there a reason that the count would go to zero if <% %> tags are used within the body of the control tags?
Here's my extremely simplified control:
public class Script : Control
{
public override void RenderControl(HtmlTextWriter writer)
{ ...
I use updatepanel and updateprogress in my project. Whenever I add updatepanel to a page, then I should add updateprogress too.
Now I want to make a custom control that include both updatepanel and updateprogress.
If there are any controls like this, Can anyone give me its link. On other hands How to make a custom control likte that?...
Hi guys.
Is there a way to appear bordered text on the TextView ?
Thanks in advance.
...
Hello, I am attempting to make a web-partish custom control. I am going to be using Mono, so no I can't just use ASP.Net's (thats what we were using before we decided to go Mono).
Basically, we want to have a custom control named WebPart which is an abstract class that our web parts derive from.
In the WebPart class I want for it to b...
Hello, I am wanting to do custom rendering of the CSS styling, as such I created a new UserControl.
From there, I thought it'd be easy just create a new CssStyleCollection under the name Style. It does not work though! How do I make this code compile? (just an example)
class MyControl : UserControl{
CssStyleCollection Style=new CssSt...
I created a custom treeview control that inherits from TreeView control. I have my own TreeNodes and event args but when the tree node is rendered I get:
<a id="ctl00_ContentPlaceHolder1_navTreet0" style="text-decoration: none;" onclick="TreeView_SelectNode(ctl00_ContentPlaceHolder1_navTree_Data, this,'ctl00_ContentPlaceHolder1_navTree...
Is there a way, using XAML (and possibly Template Bindings) to keep a control's width in a certain proportion to its height? I would like for my control, at design time in Blend, to always scale evenly.
...
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 tri...
i want a BasicEditField to behave just like a label field...the reason i want this is i cant use label field in my case as in case of 9500 the onFocus method does not work for some reason...but it does in case of basic edit field...so i need to create my own label field...
...
System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFile(@"CustomControls.Nav.dll");
//Namespace and assembly name are CustomControls.Nav , the class name for the control is WebBar
Type type = assembly.GetType("CustomControls.Nav.WebBar");
I am getting type as null.What am I doing wrong here?
...
Hi,
I'm building a custom web control with a public property which I only want to be available in design time (i.e. make it unavailable in code behind).
The DesignOnly attribute promises to do just that, but when I set [DesignOnly(true)] it has no noticeable effect whatsoever:
[Bindable(true)]
[Category("Appearance")]
[DefaultValue(nul...
In a WPF app I have a custom control. I would like the ToolTip for objects, derived from this custom control, depends on a value of one of the attributes of this custom control.
Is it possible to declare it in a Control Template of this custom control?
Something like:
<ControlTemplate>
??? // <!--XAML ToolTip declaration -->
...
<Con...
Hello,
I have a property in a control that exposes an interface. IElementTemplate. What I was hoping to do was to use the designer control to override the reference to change it to a class that inherits from this interface, but this isn't working:
protected override void PreFilterProperties(System.Collections.IDictionary properties)
...
I've got a rather complicated custom control that would boggle your mind if I showed you all of the code. ;) In general it's a panel displaying multiple controls. You can think of it as a custom list box. (Please don't tell me to use a listbox, I've been there and it doesn't meet my needs completely).
So, I set some animations in a...
I'm trying to create my own UIView subclass. I've placed it on my view in Interface Builder by dragging out a UIView, then specifying my subclass's name in the Class Identity field. Yet my UIView does not draw itself.
Here--in a simplified example--is the code in my UIView subclass:
- (id)initWithCoder:(NSCoder *)aDecoder
{
if (sel...
Hello,
I am creating a custom combobox which can draw separators. So, I override OnDrawItem() and OnMeasureItem() methods.
The problem is that OnMeasureItem() is called only once when datasource is changed. So if I want to specify a separator item later I need to remeasure it's height (because items with separator should be taller), but ...