.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

how to create property widget and change the properties of dragged-dropped UIelement in canvas in wp

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :WPF
I'm new in WPF development. I'd like to learn it. I'm curious and having problem in developing property widget for the UIElements. I want to change the properties of the dragged and dropped UIElement from the Property widget. How could I do this? I'd glad if any help is suggested. I've listbox and canvas. Elements from listbox can be dropped to the canvas. I'm trying to change the properties of the dropped element through a property widget. I don't know how to do this. I'd be grateful to any kind of support.   Regards, Binaya

View Complete Post

More Related Resource Links

DataGridView>Edit Columns> Column Read Only property is unwilling to change

Hello, I am facing the following mystery: When changing the read only property of a column to false and reopening the "edit columns" window, it mysteriously turns back to true. Even when closing the designer and changing it in the designer code, the resulting execution does not allow edit, as well as when re-opening the designer you see true again.             this.numberDataGridViewTextBoxColumn1.DataPropertyName = "Number";             this.numberDataGridViewTextBoxColumn1.HeaderText = "Number";             this.numberDataGridViewTextBoxColumn1.Name = "numberDataGridViewTextBoxColumn1";             this.numberDataGridViewTextBoxColumn1.ReadOnly = true;//False is required We thought it might be related to data binding. rebinding the grid did not help as well. The is no other place in the code where it changes. Please advice, Thanks

In a style template, express a property in terms of the controls properties it is applied to.

Hello,   In the style template below, which works fine, I'd like to express the "Points" property in terms of the applied to controls "Width" and "Height" properties.  As you see, the "Fill" property is expressed in terms of the "Background" property the template is applied to by means of Fill="{TemplateBinding Background}".  The following does not work:   Points="0,({TemplateBinding Height} / 4)  ({TemplateBinding Width} / 12.5),({TemplateBinding Height} / 4) . . ."   Is what I'm looking for possible, all in XAML, no code/converters? <Style x:Key="FolderButton" TargetType="Button"> <Setter Property="Margin" Value="2.5" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Grid> <Polygon Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" Points="0,5 4,5 6,0 23,0 25,5 50,5 50,20 0,20"/> <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid> </ControlTemplate>

how to change dynamically [Bbrowsable] attribute for a property at design time c#

hi,   how to change dynamically  [Browsable] attribute for a property  at design time c#

Windows Workflow : Activity Binding Properties Window Ellipses button not visible for one property

I have created a custom activity, when I am using this activity in workflow designer I am not getting the ellipsis button to select a property.  I am getting the ellipses button for first property LongValue while not getting the option for "NavigationUrl" property. This is the code for my custom activity. public partial class SetLongAsResult: Activity {         public SetLongAsResult() { InitializeComponent(); }         public static DependencyProperty LongValueProperty = DependencyProperty.Register("LongValue", typeof(long), typeof(SetLongAsResult));           public static DependencyProperty NavigationUrlProperty = DependencyProperty.Register("NavigationUrl", typeof(string), typeof(SetLongAsResult));           [Description("long value to be returned")]         [Category("Set Result Data")]         [BrowsableAttribute(true)]         [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]         public long LongValue         {             get             {         

VisualStateManager: change a property before it starts animation?

i realize that if we "animate" the Visibility property.. it uses the ObjectAnimationUsingKeyFrames animation to set the property after it transits to a new state... how can i change the property before it animates in the new state? i know there is the CurrentStateChanged and CurrentStateChanging event that i can use to set the property.. however... that is ok if you have 2 states.. but for my case i have a couple of states(in my case 7 states)... so if change the visibility in one of the states... the property doesn't switch back automatically when we switched to another state.... my thought of having 7 conditions to change the property just isn't the right way of doing... maybe.... it would be good if the VisualStateManager provides an attachedproperty to set on the specific ObjectAnimationUsingKeyframes to indicate whether the animation property is to be set at the start or at the end of the animation thanks

How to change the value of a foreign key field/navigation property?

How can I change the value of a foreign key field?  E.g. in the Product list view instead of the value of the field Supplier.CompanyName I want to display the Supplier.Region. I searched my whole code to get a clue, googled for "change navigation property" and looked in the docs but unfortunately I did not find any hint. If you know where to find the answer, please let me know too the source of your knowledge!          

can we change the properties of any dimension member as from hidden to unhidden without deploying a

hello , well i just want to known that , can we change the properties of any dimension member/measure as from hidden to unhidden without deploying a cube.? well i have a deployed and process cube and i just want to change some measure properties to visible from hidden without reprocessing the cube so can we do like this..?.. plz help me out ...

How Would I Create a Trigger That Changes The Property of Another Control?

I have 4 of the same controls and to make it simple I will act like I am working with the background:  <Style x:Key="backgroundTrigger"> <Style.Triggers> <Trigger Property="GroupBox.Background" Value="Red"> <Setter Property="GroupBox.Background" Value="Blue"></Setter> </Trigger> </Style.Triggers> </Style>   In essence what I am trying to do is when the background of groupBox1 changes I want the trigger to change groupbox2's background to Red without changing GroupBox1 background. I keep running into errors because I am using the same property in the condition and in the setter and also that the the name "GroupBox2" cannot be found. Although what I am actually trying to do isn't related to the background if someone could explain how it could be it would be greatly helpful.

Change webpart properties programmatically

I am attempting to modify the properties of another webpart when my webpart's button is clicked. The code compiles and runs, and stepping through it shows that the properties do change. However, they don't stay changed. This example attempts to toggle the visibility state, but other properties won't stay changed either. Any help is appreciated.     SPSecurity.RunWithElevatedPrivileges(delegate() { // get the site in this context using (SPSite SiteCollection = new SPSite(mySiteGuid)) { // get the web in this context SPWeb myWeb = SiteCollection.OpenWeb(myWebGuid); myWeb .AllowUnsafeUpdates = true; // Hide/display another webpart. Microsoft.SharePoint.WebPartPages.SPLimitedWebPartManager mgr = null; mgr = myWeb.GetLimitedWebPartManager( "default.aspx", System.Web.UI.WebControls.WebParts.PersonalizationScope.Shared); foreach (System.Web.UI.WebControls.WebParts.WebPart myWebPart in mgr.WebParts) { // If this is the webpart we want to modify... if (myWebPart.Title == "Other Webpart Name") { // Toggle the visibility state. myWebPart.Visible = ! myWebPart.Visible; myWeb.Update(); break; } } } });

Change Database and Log Properties

Hello, I have the following T-SQL code when creating a database: create database DBFA on primary ( name = 'DBFA_Data', filename = 'DBFA_Data.mdf', size = 40MB, maxsize = 2GB, filegrowth = 20MB ), log on ( name = 'DBFA_Log', filename = 'DBFA_Log.ldf', size = 20MB, maxsize = 200MB, filegrowth = 10MB ) This is working fine when creating a new database. But how can I define this properties but on a existing database? Thanks, Miguel

Change a controls properties from another window

I have a WPF App that opens a window (MainWindow) and has a button control that creates a new instance of a Window2 class and calls window2.show() When I click this button I disable it from within MainWindow code. The question I have is when the Window2 onclosing event is called  how do I access the Mainwindow button properties to enable it again. TIA Mike

Add property to user control design time properties VB windows forms

hi  everyBody,   I've  created a user control that exports a given radGridView to many file formats like Excel, PDF, Csv,... this user control takes the Gridview object as aprobeity Public Class ucExport Private _grdName As RadGridView Private exporter As RadGridViewExcelExporter Private exportVisualSettings As Boolean Dim fileName As String Dim openExportFile As Boolean Public Property grdObj As RadGridView Set(ByVal value As RadGridView) _grdName = value End Set Get Return _grdName End Get End Property End class  how could I add this property to design mode, that's when I click F4, how can I add this to prosperities, rather than code mode  

error message customization in create user wizard, change password wizard


Hi All,

Create User Wiard and Change Password Wizard contain error message literals. They display error messages when a user is trying to sign up with an username that already exists and so on.

These error messages are pre-set. How can they be customized. In particular, how can they be adjusted depending on the language.

How is this usually best achieved?

Thanks a lot.


how to change button backcolor property on a form from a class file


Hello friends,

I am having a problem of updating the main form button backcolor property from another class. I have attahced the code. Please tell how can i rectify this problem.

PopUp is another class, in which i want that when ToolStripDropDown closes it change the form button BackColor from Orange to WhiteSmoke.


public partial class PopUp : ToolStripDropDown


        public PopUp()





        protected override void OnClosed(ToolStripDropDownClosedEventArgs e)


               Form1 f1 = new Form1();

              // f1._pushed = false;

       f1.Controls["button1"].BackColor = Color.WhiteSmoke;





It seems that this line works, i checked it using MessageBox it changes the backcolor property but it does not updated to the form displayed on the screen. 

Can anyone help me

Data Base Properties column Identity value will not accept value change


In the tutorial I am doing I have been requested to change a field in the colums properties of a table.  The ID column is currentl displaying NO and NO again for "is aIdentity.  I can Highlight the values but cannot change to yes.  either in the properties talbe or in the properties window on the right hand side of IDE interface.  How do I change that value?


Changes to Properties in the Property Window not Updating in HTML Control


I'm using VWD 2010 Express and have found that when I change a property like AutoPostBack from within the property window the corresponding tag (<asp:TextBox...>) was not updated with the property change to the tag.

Is there a setting that I can change in the VWD properties that will enable changes through the property window for a control to automatically update the HTML tag for that control?

How to change properties of all Controls within a TableLayoutPanel in c#


I have a TableLayoutControl that contains several buttons.

            tableLayoutPanel1.Controls.Add(button11, 0, 2);
            tableLayoutPanel1.Controls.Add(button12, 0, 3);
            tableLayoutPanel1.Controls.Add(button13, 0, 4);
            tableLayoutPanel1.Controls.Add(button14, 0, 5);
            tableLayoutPanel1.Controls.Add(button21, 1, 2);

how can I set a property for all Controls at once? For example: set all Dock properties to DockStyle.Fill ?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend