All Questions
82
questions
0
votes
1
answer
104
views
Create object with special property if it does not exist yet
I have an OxyPlot with an X and a Y axis where I want to change the maximum values several times. To change them, I have to create the axes first.
Is there a nicer way to edit for example the X-axis (...
0
votes
1
answer
87
views
How to send an object of another class to itself?
I am very new to WPF and couldn't get my head around this so checked couple tutorials and kinda merged them together and I am here with this mess. Dont really know how should I describe my issue ...
0
votes
1
answer
116
views
Updating a property through wpf datagrid in a collection through the individual element
Ok here: source xaml in question, in ucPacketPrinting.xaml
<DataGridCheckBoxColumn
x:Name="clmPrint"
Binding="{Binding IsSelected, ...
-1
votes
1
answer
328
views
Trying to select and output data from a list of Items but receiving this instead of the name I want
System.Linq.Enumerable+WhereSelectListIterator`2[ShopApp_Sem2_Project.Item,System.String]
public class Item
{
#region Properties
public int ItemID { get; set; }
public string ProductName ...
0
votes
2
answers
251
views
How to instantiate an object in ViewModel and edit that in another ViewModel or user control
I'm new to c# and mvvm.
I have a class that has many properties, and because of that, it is not possible to present every property to user in one page. Therefore, I decided to break the UI into 4 ...
0
votes
1
answer
106
views
How to update a Control (TextBlock) from inside a static method
I've read the other threads on the subject but I'm having no joy.
I'm trying to update the content of my wpf TextBlock from inside a static method UpdateTextBlock, this method needs to be static as ...
0
votes
2
answers
684
views
Parsing Open Weather Map API response fails [duplicate]
I have this snippet of code:
public void getForcast()
{
string url = string.Format("https://samples.openweathermap.org/data/2.5/weather?q=London&appid=b6907d289e10d714a6e88b30761fae22");
...
0
votes
2
answers
96
views
c# wpf | create complex object with user-defined name to Serialize into JSON [closed]
I'm making a basic WPF c# chat app and would like to allow users to register an account. the program would append a JSON file with a structure like:
{
"user1":{
"password":"...
0
votes
1
answer
487
views
Missing reference to object [duplicate]
I have created class called ExcelMethods contains:
public class ExcelMethods
{
public string DestinationPath { get; set; }
public List<MyUsers> LoadExcelFile()
{
//My code
}
Now into ...
0
votes
1
answer
55
views
C# (wpf) after creating object instance i can not reuse it
I am working on small project, and I am trying to use object to store data. Its only: name, year and price to be stored (max 10 items).
//On click I get user input and I create new object instance
//...
0
votes
2
answers
213
views
How to Instantiate an entire XAML Grid object in C#?
I'd like to instantiate an entire XAML Grid object in C#. My Grid object is a beast, it has 9 user-input fields, borders, labels and images.
I also want five instances of my Grid object, and I ...
1
vote
1
answer
483
views
Passing object to another WPF Window C#
I need to find a way for an object which is stored in a collection to be able to use it in another Window for the purpose of displaying the values of the object in a listbox.
My code contains the ...
1
vote
1
answer
44
views
Initializing Object in XAML File breakes Designer
I'm trying to create an object in my xaml file like this:
xmnls:pfvm="clr-namespace:GameOfLifeMVVM.ViewModel"
Well the i go in the <Window.Resources> and try to create the PlayfieldViewModel ...
0
votes
1
answer
62
views
How to create two object with the same properties - Cloning not working
I have to create two datagrid with the same properties:
var dtg = new DataGrid
{
Margin = new Thickness(10),
EnableColumnVirtualization = false,
EnableRowVirtualization = false,
...
0
votes
1
answer
108
views
WPF MenuItem Click when ItemsSource bound to objects
I have a collection of Item-Objects bound to a WPF MenuItem ItemsSource
public class Item
{
public string Name
public ?? MethodToCall
}
Now i want to use my click event (I will probably use a ...