[Solved] WPF How can i make a button in “L” form

[ad_1] This can be done by overwriting the Control Template. Here is a very rough example to get you started. EDIT Updated Path to be L shape <Button > <Button.Template> <ControlTemplate> <Border> <Grid> <Polygon Points=”300,200 200,200 200,300 250,300 250,250 300,250″ Fill=”Purple” /> </Grid> </Border> </ControlTemplate> </Button.Template> </Button> 1 [ad_2] solved WPF How can i make … Read more

[Solved] Project of WPF app [closed]

[ad_1] 1) The constructor of dialog window can accept parameters. Pass whatever you want from MainWindow to dialog window. DialogWindow dialogwindow = new DialogWindow(params); dialogwindow.ShowDialog(); 2) In DialogWindow, expose the array of ints by a Property. public int[] EditedValues { get; private set;} and access it in MainWindow like int[] editedValues = dialogwindow.EditedValues; 3) same … Read more

[Solved] How to pass data from WPF form to WPF usercontrol? [closed]

[ad_1] 1)You can create public property in UserControl like: public string SomeString { get; set; } And then pass string by xaml: <UserControl1 SomeString=”String”/> or bind SomeString property to property in your MainWindow <UserControl1 SomeString=”{Binding MyStr}”/> 2)You can pass your string to UserControl by constructor. var uc = new UserControl(MyString); [ad_2] solved How to pass … Read more

[Solved] How can I check if my color value is equal to Null

[ad_1] It seems that when you don’t select a color from the colorpicker, that the colorpicker.SelectedColor is null, and causing your error. You can check for this in your code, like so: private void btnreturn_Click(object sender, RoutedEventArgs e) { int gettext; int.TryParse(txtcount.Text, out gettext); Color Colorpicker; // Check if the SelectedColor is not null, and … Read more

[Solved] Displaying error message “Email not valid” but still saving to database file

[ad_1] Because all of your code is outside of your if block. So it’s going to execute every time, regardless of the condition. Put the code in the if block: Regex regMail = new Regex(@”^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$”); if (regMail.IsMatch(mailID.Text)) { Email email = new Email(); string emailAdd = mailID.Text; string phone = phoneBox.Text; string messageEmail = email.Text; … Read more

[Solved] All tasks are blocked from ContinueWith [C#].. while calling Task.Delay waiting a value that should be changed by other tasks

[ad_1] Calling Run Initializing the tasks from within the constructor was the crime comitted.. Just by moving it to the constuctor of the Control .. it was solved! 1 [ad_2] solved All tasks are blocked from ContinueWith [C#].. while calling Task.Delay waiting a value that should be changed by other tasks

[Solved] c# put a byte[] into an database and retrive later [closed]

[ad_1] Use BINARY or VARBINARY to store binary data. string query = “INSERT INTO dbo.MyTable(Content) VALUES(@Content)”; using(SqlConnection connection = new SqlConnection(/*yout connection string here*/)) using(SqlCommand command = new SqlCommand(query, connection)) { connection.Open(); SqlParameter param = command.Parameters.Add(“@Content”, SqlDbType.VarBinary); param.Value = YourByteArrayVariableHere; command.ExecuteNonQuery(); } You could retrieve it by using a SqlDataReader to get data and than … Read more

[Solved] How to read and update Excel from WPF screen [closed]

[ad_1] I find these link useful. Try out once http://www.c-sharpcorner.com/UploadFile/rahul4_saxena/read-write-and-update-an-excel-file-in-wpf/ http://www.dotnetcodesg.com/Article/UploadFile/2/4331/WPF%20Read%20Write%20and%20Update%20in%20an%20EXCEL%20File.aspx [ad_2] solved How to read and update Excel from WPF screen [closed]

[Solved] Printed JPG image with mirrored output [closed]

[ad_1] It seems, your original photo contains EXIF metadata records. Among others, it can contain additional instructions how to process the image before being shown. Some apps/SDKs do respect that instructions, others silently ignore EXIF – this is why you can receive such thing as mirroring etc. EXIF orientation values There are 8 possible EXIF … Read more