user-controls

How to make container dependent control?

蹲街弑〆低调 提交于 2020-01-06 14:11:12
问题 I am creating a Wizard Control in C# application. So, I have created two classes XWizardControl and XWinzardPage . The collection of XWizardPage will be created in XWizardControl. User can manually add number of XWizardPage in XWizardControl just like TabPage in TabControl. My problem is developer cannot use that XWizardPage control directly in any other container or form. They cannot add directly into any container. But they can create object from the editor and it should not be displayed in

MVVMLight within another MVVMLight project

巧了我就是萌 提交于 2020-01-06 08:37:07
问题 I am working on a MVVMLight / WPF project and need to add a chunk of functionality which will include multiple views and viewmodels. I know this same bit of functionality will be used in other projects in the near future so I would like to make this functionality its own project that I can add to other solutions as needed wiuth little or no modification. I started by adding a second MVVMLight project (Beta), removing the standard MainWindow.xaml and MainViewModel.cs files and created a simple

Overload resolution failed because no accessible 'New' is most specific for these arguments:

冷暖自知 提交于 2020-01-06 02:13:08
问题 I have a usercontrol with a repeater. Originally in page load I had code which grabbed data from the database and bound to the repeater. I now want to take this functionality outside of the usercontrol so that I can have more than one on the page and have them bind to different data. My code now is: Imports System.ComponentModel Public Class UpdateList Inherits System.Web.UI.UserControl Private m_dataSource As Object <TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System

Rounded Corners in UserControl not showing

我的未来我决定 提交于 2020-01-05 10:16:25
问题 I am trying to get my UserControl to display rounded corners. This is my markup: <Border CornerRadius="10" Padding="5" HorizontalAlignment="Center" VerticalAlignment="Center" > <Grid> <Grid.RowDefinitions> <RowDefinition Height="50" /> <RowDefinition Height="20" /> <RowDefinition Height="25" /> <RowDefinition Height="25" /> <RowDefinition Height="25" /> <RowDefinition Height="25" /> <RowDefinition Height="50" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="10" />

Fire trigger in UserControl based on DependencyProperty

好久不见. 提交于 2020-01-05 09:53:40
问题 have a very easy question, but it seems I could not find the answer on the Internet for it. Possibly because I am not looking in the right places. I have a user control with a DependencyProperty of a custom enum type. In XAML I would like to Show/Hide elements based on the value of the enum type. I tried to do this with DataTriggers but I fail to get it working. <UserControl x:Class="WpfApplication1.DisplayIcon" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http:/

Winforms User Control MissingMethodException

核能气质少年 提交于 2020-01-05 09:28:14
问题 So essentially, I have a custom user control called ExcelDisplay. I try to drag it over in visual studio from the toolbox into my webform in the same project and I get a missing method exception. At one time the constructor was parameterized, but I changed it after deciding it was a bad design idea. It looks like it is saying the constructor is missing, but its obviously there. My winform to house the control is empty with the exception of the autogenerated code visual studio puts there. The

Make UserControl fullscreen

僤鯓⒐⒋嵵緔 提交于 2020-01-05 08:48:13
问题 I'm developing a reusable UserControl that among other features should provide a full screen mode. But how to accomplish this? Typically, the container form should be maximized, not the UserControl. Is there any way to force a UserControl to temporary occupy the entire screen? I understand this is not something that should be normally done, but I have reasons to make it this way. 回答1: Temporarily move the control to a new borderless form and make that form full screen. 回答2: You should be able

Binding from View-Model to View-Model of a child User Control in Silverlight? 2 sources - 1 target

故事扮演 提交于 2020-01-05 08:29:12
问题 So i have a UserControl for one of my Views and have another 'child' UserControl inside that. The outer 'parent' UserControl has a Collection on its View-Model and a Grid control on it to display a list of Items . I want to place another UserControl inside this UserControl to display a form representing the details of one Item . The parent UserControl's View-Model already has a property on it to hold the currently selected Item and i would like to bind this to a DependancyProperty on the

Binding from View-Model to View-Model of a child User Control in Silverlight? 2 sources - 1 target

删除回忆录丶 提交于 2020-01-05 08:28:30
问题 So i have a UserControl for one of my Views and have another 'child' UserControl inside that. The outer 'parent' UserControl has a Collection on its View-Model and a Grid control on it to display a list of Items . I want to place another UserControl inside this UserControl to display a form representing the details of one Item . The parent UserControl's View-Model already has a property on it to hold the currently selected Item and i would like to bind this to a DependancyProperty on the

User controlled Quaternion Slerp?

左心房为你撑大大i 提交于 2020-01-05 07:25:27
问题 I am trying to rotate a sphere with user control. void RotateGlobe() { SetLock(); if (Input.GetMouseButton(0)) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); userInput.x = Input.GetAxis("Mouse X"); userInput.y = Input.GetAxis("Mouse Y"); if (userInput.magnitude > 0 & Physics.Raycast(ray, Mathf.Infinity, LayerMask.NameToLayer("UI"))) { Vector2 movement = new Vector2(Mathf.Sign(userInput.x), Mathf.Sign(userInput.y)); globe.transform.rotation = Quaternion.Slerp(globe.transform