Questions tagged [xaml]

XAML stand for eXtensible Application Markup Language. It was introduced in Microsoft's .NET 3.0 framework and is used heavily in WPF applications.

XAML stand for eXtensible Application Markup Language. It was introduced in Microsoft's .NET 3.0 framework and is used heavily in UI layout for WPF applications. More information can be found here: http://msdn.microsoft.com/en-us/library/ms752059.aspx and also here: http://en.wikipedia.org/wiki/Extensible_Application_Markup_Language

32 questions
50
votes
2 answers

Why does the .Net world seem to embrace magic strings instead of staticly typed alternatives?

So, I work in .Net. I make open source projects in .Net. One of my biggest problems with it isn't necessariyl with .Net, but with the community and frameworks around it. It seems everywhere that magical naming schemes and strings is treated as the…
Earlz
  • 22,658
  • 7
  • 46
  • 60
49
votes
10 answers

Under what conditions is the use of MVVM appropriate?

Model View View-Model was developed by Microsoft to target UI development platforms which support event-driven programming, specifically Windows Presentation Foundation (WPF) and Silverlight on the .NET platforms using XAML and .NET languages. In…
Kelly Sommers
  • 599
  • 1
  • 4
  • 3
21
votes
6 answers

Advantages and disadvantages to using XAML/C# or HTML5/JavaScipt for Metro apps?

I was just wondering if there are any major advantages or disadvantages to using either XAML/C# or HTML5/JavaScript for Metro Apps.
Ein Doofus
  • 921
  • 2
  • 9
  • 13
21
votes
5 answers

Are value converters more trouble than they're worth?

I'm working on a WPF application with views that require numerous value conversions. Initially, my philosophy (inspired in part by this lively debate on XAML Disciples) was that I should make the view model strictly about supporting the data…
devuxer
  • 666
  • 6
  • 13
16
votes
3 answers

In hindsight, is basing XAML on XML a mistake or a good approach?

XAML is essentially a subset of XML. One of the main benefits of basing XAML on XML is said to be that it can be parsed with existing tools. And it can, to a large degree, although the (syntactically non-trivial) attribute values will stay in text…
Roman Starkov
  • 4,469
  • 3
  • 31
  • 38
9
votes
7 answers

Please explain the benefit(s) of using an XML-based syntax (e.g. XAML) instead of normal source code (e.g. WinForms)?

First off, please note that this question is not about WPF vs. WinForms. What are the highest-ranking benefits that led Microsoft to invent XAML in favour of the “old” approach of generating compilable C# code? My impression is that other developers…
Timwi
  • 4,411
  • 29
  • 37
8
votes
2 answers

What is the difference between routed events and attached events?

I am just going through the WPF concepts I came across these routed events, dependency properties and attached events. What are the concepts behind them and why are they called instead of .NET ordinary methods?
judith
  • 91
  • 1
  • 1
  • 3
6
votes
1 answer

Wpf: Event driven vs MVVM design pattern

I'm a beginning coder and I've been working on a WPF app for several months now and struggled to implement anything in MVVM due to time constraits to learn so I coded my program the only way to knew how: with code behind, tight coupling, and a whole…
user2525395
  • 101
  • 1
  • 5
5
votes
3 answers

Is using getters in XAML view-models a bad thing?

I've recently had an argument with a colleague about using getters (without setters) in a view-model classes used by XAML. Example: public string FullName { get { return $"{FirstName} {LastName}"; } } //call…
MBender
  • 273
  • 1
  • 4
  • 9
5
votes
1 answer

Why, in WPF, do we set an object to Stretch via its Alignment properties instead of Width/Height?

In WPF's XAML, we can tell an element to fill its container like this:
doppelgreener
  • 1,274
  • 17
  • 26
5
votes
3 answers

Cross platform or web development with .NET

With iOS and Android soaring on mobile devices that become ever more pervasive, every other year being the 'year of Linux on the desktop' - which is somewhat snarky, but they are getting there -, OSX still holding its own, the time when one could…
Martijn
  • 1,016
  • 9
  • 14
3
votes
1 answer

What does "Stateful" means in Stateful ViewModel in MVVM

I was reading about some XAML patterns, and there was the Stateful ViewModel, according to what I read it has nothing different than what we as just the "ViewModel". Here's a description for example : Stateful View Model: To create isolation…
AymenDaoudi
  • 131
  • 4
3
votes
0 answers

Should UserControl's be Views in an XAML MVVM application (WPF or Store app)?

I am about to use Caliburn.Micro for a new XAML Store app (not sure what to call it nowadays - does not appear to be called a "Windows Store app" any longer). The documentation (see Simple Navigation section) advocates using UserControls for "Views"…
markmnl
  • 727
  • 1
  • 6
  • 18
3
votes
0 answers

How to use data shaped by the UI from the ViewModel while keeping concerns separated?

I'm coming from a winforms background and trying to get ahold of MVVM and XAML. Right now I'm wondering how I can take advantage from a data-shaping control (either native or provided by a third party) while maintaining separation of concerns…
Crono
  • 1,617
  • 15
  • 24
3
votes
0 answers

Performance consideration and code reduction for Templates

I'm trying to decide if this might be a good idea to help reduce the size of some of my xaml resource dictionaries on a large project. Except I'm concerned about any potential performance issues going this route so hoping to get some insight from…
Chris W.
  • 131
  • 3
1
2 3