user-controls

How to achieve embedded custom tags in asp.net?

孤人 提交于 2020-01-17 07:30:50
问题 I found this example: <telerik:RadDatePicker ID="RadDatePicker1" runat="server"> <DateInput Width="100%"></DateInput> <Calendar CellAlign="Center" CellVAlign="Middle" DayNameFormat="FirstLetter" FirstDayOfWeek="Default" MonthLayout="Layout_7columns_x_6rows" Orientation="RenderInRows" TitleAlign="Center" UseColumnHeadersAsSelectors="False" ShowRowHeaders="False"> </Calendar> <DatePopupButton CssClass="radPopupImage_Default" BorderColor="#D0E1F2" BorderStyle="Solid" BorderWidth="1px" /> My

asp.net UpdatePanel with UserControls and Page Level Async Method

我只是一个虾纸丫 提交于 2020-01-17 06:37:06
问题 I have an asp.net page which has amoungst some basic labels etc, and an updatepanel containing a dynamic list of UserControls. Each control has its own UpdatePanel, and basic controls. I have hatched together a collaps/expand feature for these controls and has been working fine to date. To make the page more efficient I have been working to 'Async-ify' the heavy data processing that happens during load, to display in these fields and user controls. After all of these changes everything still

Making a Form as a reusable Control like FolderBrowser

末鹿安然 提交于 2020-01-17 05:36:07
问题 I have created a form that emulates a FolderBrowseDialog , but with some added features I wanted. It's tested and working, so now I want to make it into a control. My problem is that as soon as I inherit from UserControl instead of Form , I no longer have a Close() method, and I no longer have a FormClosing event. When I click on the OK or Cancel button, how do I close the form and return control to the calling object? 回答1: To make it a reusable component, instead of trying to derive it from

How to detect if WinForms Panel has scrolled to the end?

喜欢而已 提交于 2020-01-17 03:20:09
问题 I am developing a WinForms application in which there is a panel which contains some user-controls. When the panel loads for the first time it shows 10 user controls. But when it is scrolled down completely it should load and append more user controls at the end of the panel. I am trying to achieve this using this code: private void topicContainer_Scroll(object sender, ScrollEventArgs e) { if (e.NewValue== topicContainer.VerticalScroll.Value) MessageBox.Show("Topics load here"); } Its just a

How to access ItemsSource property of a DataGrid defined in UserControl from main xaml file?

只谈情不闲聊 提交于 2020-01-17 00:37:17
问题 I have declared a DataGrid in UserControl. Now I have included the UserControl in my main xaml file. I am trying to set the ItemsSource property of DataGrid from main.xaml; but I am getting an error "The property ItemsSource doesnot exist in the namespace". I am able to set the other properties like Background,Foreground, etc. My UserControl has this : <wpfkit:DataGrid Name="DataGrid1" AutoGenerateColumns="True" Width="Auto"> </wpfkit:DataGrid> In main.xaml : <usercontrol:MultiStepProcessGrid

How to access ItemsSource property of a DataGrid defined in UserControl from main xaml file?

▼魔方 西西 提交于 2020-01-17 00:36:47
问题 I have declared a DataGrid in UserControl. Now I have included the UserControl in my main xaml file. I am trying to set the ItemsSource property of DataGrid from main.xaml; but I am getting an error "The property ItemsSource doesnot exist in the namespace". I am able to set the other properties like Background,Foreground, etc. My UserControl has this : <wpfkit:DataGrid Name="DataGrid1" AutoGenerateColumns="True" Width="Auto"> </wpfkit:DataGrid> In main.xaml : <usercontrol:MultiStepProcessGrid

wpf Popup.IsOpen binding in code-behind doesnt work (UserControl)

别来无恙 提交于 2020-01-16 19:54:33
问题 I am new to WPF and XAML and cant find what I am doing wrong here. My UserControl has few controls, and I need to control Popup.IsOpen from code-behind. public bool PopupVisible { get { //true if( txtSearch.IsKeyboardFocusWithin ) return true; if( txtSearch.IsMouseOver ) return true; //false if( txtSearch.IsKeyboardFocusWithin == false && ( grid.IsMouseOver == false || popContainer.IsMouseOver == false || popContainer.IsMouseOver == false) ) { return false; } return false; } } My XAML:

wpf Popup.IsOpen binding in code-behind doesnt work (UserControl)

吃可爱长大的小学妹 提交于 2020-01-16 19:54:12
问题 I am new to WPF and XAML and cant find what I am doing wrong here. My UserControl has few controls, and I need to control Popup.IsOpen from code-behind. public bool PopupVisible { get { //true if( txtSearch.IsKeyboardFocusWithin ) return true; if( txtSearch.IsMouseOver ) return true; //false if( txtSearch.IsKeyboardFocusWithin == false && ( grid.IsMouseOver == false || popContainer.IsMouseOver == false || popContainer.IsMouseOver == false) ) { return false; } return false; } } My XAML:

Communicating from/to usercontrol in tabcontrol in form

[亡魂溺海] 提交于 2020-01-16 00:47:10
问题 I thought C# was hard. Try posting a question in stackoverflow. I have a listbox and a button in a usercontrol, itself in a tabpage of a tabcontrol, itself on a form. I need to populate the listbox from the form when the button is clicked. form > tabcontrol > tabpage > usercontrol > listbox & button So, how do you notify the form that a deeply buried button has been clicked and then fill the listbox from the form (or call the usercontrol from the form to populate the listbox)? Thank you guys.

Handling events for dynamically generated .NET user control

给你一囗甜甜゛ 提交于 2020-01-15 12:34:09
问题 I am working on a page that accepts scanned input into a textbox. Once input is entered into the textbox, a user control that contains additional fields for the input item is dynamically generated via autopostback. The user control also contains a link button that is intended to delete the item (itself). Clicking this button generates a "delete" event that is supposed to bubble up to the parent. Unfortunately this does not seem to happen - the deletion handling code is never reached. My