- AdamJonsson
- Posts: 10
- Joined:
Double is not supported in a Windows Present
I'm trying to specify height as a resource in xaml.
What I found in other forums was this:
However, I get this error
What I found in other forums was this:
Code: Select all
<Window x:Class="MyName.WindowMobile"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:MyName"
mc:Ignorable="d"
Title="WindowMobile" Height="640" Width="320" Background="#FFF0F0F0">
<Window.Resources>
<sys:Double x:Key="Height">200</sys:Double>
<sys:Double x:Key="Width">200</sys:Double>
</Window.Resources>
XDG0008 Double is not supported in a Windows Presentation Foundation (WPF) project.
XDG0008 Double is not supported in a Windows Presentation Foundation (WPF) project.
XDG0006 The namespace prefix "sys" is not defined.
Is this method outdated?XLS0414 The type 'sys:Double' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
-
sfernandez
Site Admin
- Posts: 2997
- Joined:
Re: Double is not supported in a Windows Present
You are missing the System namespace definition where Double type is declared:
Code: Select all
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 7 guests