How to change image source in WP8 using C#? - windows-phone

I have an Image object created in XAML in my Windows Phone 8 project. I'd like to change the Source property in C#. How would I go about doing that? I've followed the code at https://stackoverflow.com/questions/5770527/imagebutton-change-source-property but had no success. BitmapImage does not seem to be valid for Windows Phone 8. Does anyone know the correct way to change image sources in C# for WP8? Thank you.

Well the solution ended up being something simple. I just needed to import the System.Windows.Media.Imaging namespace. I added
using System.Windows.Media.Imaging;
to the top of my file, which fixed the problem.

Related

Remove the Rotate icon in Syncfusion WinRT Diagram

Hi, I need to develop an WinRT app with XAML and I'm using Syncfusion's library for that. Whenever I click on a node the resizer appears along with the rotate icon. I removed all the QuickCommands but the rotate icon won't go away.
Please note that I am using the SfDiagram inside a custom control. Thanks
We are glad to announce that our Essential Studio 2015 Volume 1 is rolled out and is available for download under the following link:
http://www.syncfusion.com/forums/118723/essential-studio-2015-volume-1-final-release-v13-1-0-21-available-for-download
Feature Information:
Requirement: Remove the Rotate Icon from Node
We have provided support to achieve your requirement in our Essential Studio 2015 Volume 1.This requirement can be achieved by using SelectorConstraints property of ISelector. We have provided code snippet to represent this. Please refer to the following code snippet
Code Snippet:
(DiagramControl.SelectedItems as ISelector).SelectorConstraints = (DiagramControl.SelectedItems as ISelector).SelectorConstraints & ~SelectorConstraints.Rotator;
Here, DiagramControl is the instance of SfDiagram.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Syncfusion Support Team

Setting ApplicationBarButton.IconUri with icon from Isolated Storage

I am working on windows phone application in which i need to change ApplicationBarButton icon dinamically, for example to show current date like in default Windows Phone Calendar app. Regarding to this article, we can use only png images previously added to solution and reference to them with relative Uri.
It is not a problem for me to generate correct png image (this way and using ToolStack C# PNG Writer Library) and save it to isolated storage, but when i'm initializing AppBarButton with absolute Uri to this image and trying to add it to ApplicationBar, my app throws ArgumentException.
Am i doing something wrong or i just have to draw 366 icons and add them to my project? :)
Thanks in advance!

Using Path Animation in Windows 8 using XAML

I would like to animate a UI control (an Image actually) over a Path provided.
It is looking that it is not possible to do it in Windows 8 using XAML although it was possible with .NET 4.5 as far as I could see from the below reference.
http://msdn.microsoft.com/en-us/library/ms746981.aspx
My question is whether there is a work around that I can use to achieve my goal or get closer to it.
WinRT is very similar to Silverlight, so many Silverlight solutions can work in WinRT with minimal or no changes. This sample on CodeProject should give you DoubleAnimationUsingPath with little work.
http://www.codeproject.com/Articles/30819/Animation-Along-a-Path-for-Silverlight

How to draw graphics object in windows 8 winRT

How i can draw hand free graphic objects in windows 8, like paint can. I implemented such things in windows phone with Inkpresenter. But in winRT it seems that no such items are present. So i decided to use WritablebitmapEX, but idont know hot to implement this in windows 8. No sample code present in the downloading site. please any one help me to solve this issue.
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/282a211e-e3bf-4184-8868-40208aa596dd
there is a good quickstart page on the Microsoft Site
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh974457.aspx

How can i design menu and title in vb.net?

I Would like to create my menu groups in my desktop application as the one shown in sample image. I would like to know which control is used for it? What extra works we need to do on it?
A reference to similar one is also welcome...
Thanks
CollapsiblePanel or Accordian or TaskPane.
Check out .Net 2.0 SDK Samples, specifically Technologies\WinForms\TaskPane.