user-controls

Error in Web User Control with ITemplate in the Design mode

安稳与你 提交于 2020-01-15 11:25:48
问题 I have a web user control with the following markup <table> <tr> <td> <h1> <%= this.Title %></h1> </td> </tr> <tr> <td> <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder> </td> </tr> <tr> <td> <h2> Footer</h2> </td> </tr> </table> the code behind: [ParseChildren(true, "Content"), PersistChildren(true)] public partial class WebUserControl1 : System.Web.UI.UserControl { public string Title { get; set; } [PersistenceMode(PersistenceMode.InnerDefaultProperty), TemplateContainer

Get UserControl from inside ControlCollection

大城市里の小女人 提交于 2020-01-15 11:08:36
问题 So i am currently adding a collection of usercontrols to a Panel Collection. Here is that code foreach (IssuePoll poll in issuePollList) { IssuePollsUC issuePoll = (IssuePollsUC)Page.LoadControl("~/UserControls/IssuePollsUC.ascx"); issuePoll.LoadPoll(poll, false, politician.PoliticianID); pnlUnFinishedTest.Controls.Add(issuePoll); } I am trying to get those usercontrols so i can call a validate method and save method inside each of those controls. Here is the code i am using for that, but it

How to disable resizing of user control in WPF

梦想与她 提交于 2020-01-15 08:14:34
问题 I have Usercontrol.I want to disable its resizing. The usercontrol is: <UserControl x:Class="DocumentUpload" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" xmlns:telerikGrid1="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" xmlns:telerikInp="clr-namespace:Telerik.Windows

WPF Template Binding in ToggleButton UserControl

↘锁芯ラ 提交于 2020-01-15 08:14:12
问题 I'm developing a basic dip-switch user control as a personal learning exercise. Originally I had it set up where you could declare some custom color properties on the user control, and they would be used on elements inside the control. However, I recenly discovered ToggleButtons, and rebuilt my control to take advantage of them. Since then, my custom color properties (SwitchColor and SwitchBkgndColor) no longer work properly. They are always rendered with the default colors, not the colors I

How to disable resizing of user control in WPF

柔情痞子 提交于 2020-01-15 08:12:18
问题 I have Usercontrol.I want to disable its resizing. The usercontrol is: <UserControl x:Class="DocumentUpload" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" xmlns:telerikGrid1="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" xmlns:telerikInp="clr-namespace:Telerik.Windows

WPF - UserControl with images not showing properly

馋奶兔 提交于 2020-01-15 07:05:52
问题 Ok, here is my problem: I have created a UserControl named MultiImage, which is composed by a two images, one bigger than the other. What I am trying to do in the MainWindow is that, when you press a given RadioButton, one of the two images changes it source (2 RadioButtons change the big image and 3 change the little one). In the design view of the MultiImage class I can see the elements, but in the design view of the MainWindow, the object doesn't appear, and once you start the application

WPF - UserControl with images not showing properly

前提是你 提交于 2020-01-15 07:05:40
问题 Ok, here is my problem: I have created a UserControl named MultiImage, which is composed by a two images, one bigger than the other. What I am trying to do in the MainWindow is that, when you press a given RadioButton, one of the two images changes it source (2 RadioButtons change the big image and 3 change the little one). In the design view of the MultiImage class I can see the elements, but in the design view of the MainWindow, the object doesn't appear, and once you start the application

Expose the properties of a usercontrol which is built in MVVM

一个人想着一个人 提交于 2020-01-15 06:49:48
问题 There are lots of questions like this one, but still can't get what I really want, and all of them have something that differs of mine and that is: I have a UserControl : Built separately in a class library project called UCProject ; The project UCProject has a View for the control, and its ViewModel ; The UserControl binds some of its own controls and UIElements properties in the View to properties declared in the ViewModel in, of course, the UCProject; How can I show or expose or make the

Some questions about ASP.Net Postback

£可爱£侵袭症+ 提交于 2020-01-15 05:14:31
问题 Lets say I have a text box which should have a default value.... and it is in an initializing function like so: void InitializeControls() { myTextBox.Text = "Default Text"; } Now, lets say that I have a button, which does a postback... I want to save the user entered value of the textbox off somewhere in the button's OnClick event. My question is, when should I call the initializing control code above? I'm thinking it should be in the OnLoad function, however this seems like that I will

Any year view scheduler and calendar asp.net control available there

泄露秘密 提交于 2020-01-14 18:50:31
问题 I searched the internet for a calendar/scheduler year view control. The UI should looks like the screenshot I gave. I will put all events to this control. So far, I only found: http://web2cal.com/ajaxeventscalendar/calendar-demo/912-premium-demo/172-year-view-demo (not very decent) and the control at http://www.daypilot.org/scheduler-lite.html,which is close but not excatly I want. I've reasearched the compenentArt,telerik, but there controls only give month/day view not a year view. Any