Questions tagged [system.windows.media]

44 questions
0
votes
2 answers

MediaTranscoder.PrepareFileTranscodeAsync UnauthorizedAccessException

I have a Button on a Page with the following method on the click event of the button: StorageFile _sourceFile; private string _sourceToken; private async void btnSelect_Click(object sender, RoutedEventArgs e) { FileOpenPicker fop = new…
Andrew Harris
  • 1,419
  • 2
  • 17
  • 29
0
votes
1 answer

What do I need to reference to access CustomTextParagraphProperties?

Working with TextFormatter, I came accross this article on MSDN which shows the following sample code : // Create a TextFormatter object. TextFormatter formatter = TextFormatter.Create(); // Create common paragraph property…
Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
0
votes
1 answer

How to combine multiple System.Windows.Media.DrawingVisual object into one image in WPF?

I have multiple functions which are returning System.Windows.Media.DrawingVisual object. I need to combine all the DrawingVisual object into one image. private System.Windows.Media.DrawingVisual Shape1() { DrawingVisual dv = new…
M.Kumaran
  • 863
  • 1
  • 9
  • 28
0
votes
1 answer

unable to add reference to windows.media.speechsynthesis.dll

I am working on text to speech conversion in windows 8.1 (silverlight) and i need to access the SynthesizeTextToStreamAsync method for which I need to add reference to Windows.media.speechSynthesis. I am unable to add this reference to my project it…
0
votes
1 answer

DrawingContext.PushOpacityMask() with BitmapImage does not work

I want to take a given BitmapImage and use its grayscale/black-and-white representation as an opacity mask on a DrawingContext. I got far enough to do the color conversion, so I ended up with the follwing state of a demo application: Method on…
0
votes
1 answer

VB.NET: Output all Windows.Media.Brushes

I have some shapes on an WPF in VB.Net. I added a handler, so I'm able to delete or edit the shapes with my controls. For that I added an combobox where I wanna display all Windows.Media.Brushes so I can select one and add the color to the shape. My…
stan
  • 15
  • 4
0
votes
1 answer

WPF FormattedText randomly disappears in high resolution images

I have the requirement to create 600 DPI "trifold" images, which have the dimensions of 25.5"x11" (three times the size of a Letter page). To do so, I’m using WPF Imaging through the DrawingVisual, DrawingContext, and RenderTargetBitmap classes. …
0
votes
1 answer

Saving Windows.Media.Drawing with BmpBitmapEncoder black image - how to remove alpha?

I'm using SVG# (http://sharpvectors.codeplex.com/), to batch convert SVG files to other formats. The SVG images being converted are black line drawings with no background. I've little experience with WPF or the System.Windows.Media namespace, so…
Jack
  • 425
  • 4
  • 12
0
votes
1 answer

Can't add System.Windows.Media.Imaging.JpegBitmapEncoder in WP

I'm trying to use the type JpegBitmapEncoderin the name space System.Windows.Media.Imaging, but i can't seem to use it. The namespace itself is available and i can use it but for some reason the JpegBitmapEncoder is not there... How can i use it?
CodeMonkey
  • 11,196
  • 30
  • 112
  • 203
0
votes
1 answer

how to have a slow motion stop in c# windows phone?

This is my code in c# microsoft visual studio windows phone. My application is all about "SPIN THE BOTTLE", unfortunately, it spins fast but never slows down while near in stopping, it just stop then that's it. Can anyone pls. help me? How to have…
0
votes
1 answer

Can I freeze silverlight SolidColorBrush?

I have a silverlight application that I want to optimize! Am i right to assume reducing the number of new objects of type System.Window.Media.SolidColorBrush may be an advantage? (i'm talking thousands...) I'm looking to use only a couple of…
Diogo
  • 316
  • 5
  • 11
-1
votes
1 answer

How to create a property of type System.Windows.Media.Color with a custom value

I'm creating a ViewModel and I can't find a way to create something like the following pseudo code: private Color _GradientColor = new Color().DodgerBlue; //Something like this I can do: private SolidColorBrush _GradientColor = new…
-1
votes
1 answer

Work with instance of class in C#

I have some troubles with a class instance and don’t understand the issue. I’m working with colored text in different classes and therefore my idea was to define this colors only one time so changing of them will be much easier. For the definition…
-1
votes
1 answer

How would I convert an Ellipse with a fill to an ImageDrawing in C#

I have created an Ellipse. How would I then convert that Ellipse to a ImageDrawing? Essentially what I am trying to do is take 3 ImageDrawings, (TopDrawing a MiddleDrawing and BottomDrawing), Stack them on top of eachother to create a Single…
7VNT
  • 41
  • 8
1 2
3