MSDN sample code not working: BusyIndicator not found - silverlight

I downloaded the source code of
http://silverlight.net/learn/videos/silverlight-videos/twitter-search-monitor/#video
Visual Studio 2010 converted it to SL4. When running it complains
Error 3 The type or namespace name 'BusyIndicator' does not exist in the
namespace 'System.Windows.Controls'
(are you missing an assembly
reference?) C:\tutorials_dotnet\silverlight\HDI-Silverlight-source-TwitterSearchApp_CS\TwitterSearchMonitor\obj\Debug\Views\Search.g.cs 38 42 TwitterSearchMonitor

The BusyIndicator is not found in the Silverlight SDK, its in the Toolkit which you need download and install.
Once installed add a reference to the System.Windows.Controls.Toolkit dll.
Add this namespace alias to the page using the BusyIndicator:-
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
You then use toolkit: alias to define it:-
<toolkit:BusyIndicator x:Name="busyIndicator>
<!-- your page content -->
</toolkit:BusyIndicator>

Related

ToastContentBuilder could not be found

I'm trying to use toast notifications in my Windows app, and I'm using the following code...
new ToastContentBuilder()
.AddText("Hello");
But I'm getting the following error...
error CS0246: The type or namespace name 'ToastContentBuilder' could not be found (are you missing a using directive or an assembly reference?)
You need to install the Microsoft.Toolkit.Uwp.Notifications NuGet package!
In Visual Studio's solution explorer, right click your project, click "Manage NuGet Packages", search for "uwp notifications" and install the Microsoft.Toolkit.Uwp.Notifications package.
Then, IntelliSense should suggest adding the following using statement...
using Microsoft.Toolkit.Uwp.Notifications;
After that, everything should be working!

The tag 'XamlControlsResources' does not exist in XML namespace 'using:Microsoft.UI.Xaml.Controls'

I was trying to use WinUI so I installed the plugin Microsoft.UI.Xaml (2.4.2) from Nuget
and followed the instructions which says add This <XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/> to my App.Xaml
and here is my App.Xaml file
<Application x:Class="WpfApp1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp1"
StartupUri="MainWindow.xaml">
<Application.Resources>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
</Application.Resources>
</Application>
but it says:
The tag
'XamlControlsResources' does not exist in XML namespace
'using:Microsoft.UI.Xaml.Controls'
i tried older versions from WinUI plugin and tried .Net Core and Framework but still having this problem
I believe this WinUI 2.4.2 library is only compatible if you create a UWP application, not a WPF app.
Having said that, according to this documentation from Microsoft, starting with WinUI 3, you will be able to do this in WPF.
Add
<package id="Microsoft.UI.Xaml" version="2.5.0-prerelease.200812001" targetFramework="native" />
If you browse and can't find it add a line containing the above to the packages.config file check installed and the wait for Restore to show up in Nuget tools.
Make certain a reference is in the <Import Project="packages\Microsoft.UI.Xaml" version="2.5.0-prerelease.200812001..."
And also the <Error Condition="!Exists('packages\Microsoft.UI.Xaml" version="2.5.0-prerelease.200812001..."
in the .vcxproj file for your project.

RadMaskedTextBox Error after upgrade from Silverlight 4 to Silverlight 5

I've got the following error message after upgrading from Silverlight 4 to Silverlight 5
The type or namespace name 'RadMaskedTextBox' could not be found (are you missing a using directive or an assembly reference?)
How this problem can be solved?
RadMaskedTextBox not exists anymore, you must use the RadMaskedInput class now.
More info in Telerik's site.

WPF applying theme

i have a WPF project using VS2010 that i'ld like to add a theme to it
What i've done is :
downloaded the WPFToolkit.msi, and ran it.
downloaded the Aero.NormalColor.xaml (for example) and added it to the project.
As references i added :
WPFToolkit
PresentationFramewoek.Aero
In the App.xaml i added this :
ResourceDictionary Source="Aero.NormalColor.xaml"
The project run with no errors but still the theme not applied.
So can anybody tell me what i've been missing here ?
Welcome to SO! Try this:
<ResourceDictionary Source="/PresentationFramework.Aero,
Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35,
ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />

how to add PlaneProjection reference to silverlight project?

I'm trying to create silverlight project using eclipse.
i've used PlaneProjection tag in xaml page.
this automatically generated code in CSharp..
there i'm getting error like,
The type or namespace name 'PlaneProjection' could not be found (are you missing a using directive or an assembly reference
Page.g.cs /Hekllo/obj/Debug line 44 Problem Full Build Marker
what i've understood is there is no reference available here for PlaneProjection.
Please help me.
Your project must have a reference to System.Windows.dll
Typically it can be found here:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\vX.X\System.Windows.dll

Resources