Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
I

Insincere Dave

@Insincere Dave
About
Posts
182
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Graphical Lasso to Select Controls
    I Insincere Dave

    The first result for lasso.

    WPF php com design tools question

  • Apply two animations to a text block simultanously
    I Insincere Dave

    You need to set the PositionCount of the TextEffect. te.PositionCount = this.gameOver.Text.Length;

    WPF wpf

  • Non Rectangular Window in WPF Help
    I Insincere Dave

    You need a ContentPresenter in your ControlTemplate and set the TargetType of the ControlTemplate too.

    <Window.Template>
        <ControlTemplate TargetType="{x:Type Window}">
            <Grid>
                <Rectangle Stroke="Black" RadiusX="97.5" RadiusY="97.5" >
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="Black" Offset="0"/>
                            <GradientStop Color="White" Offset="1"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <ContentPresenter />
            </Grid>
        </ControlTemplate>
    </Window.Template>
    
    WPF wpf help csharp dotnet com

  • Disabling MenuItem Icon
    I Insincere Dave

    Use {DyamicResource menuImageStyle} instead.

    WCF and WF help css wpf wcf data-structures

  • WPF Rotate transform issue
    I Insincere Dave

    Try LayoutTransform instead of RenderTransform.

    WPF help csharp css wpf question

  • multiple big images on canvas in WPF - rendering problems
    I Insincere Dave

    Im guessing you are hitting the memory limit of the GPU. You might want to try TransformedBitmap and scale it that way, I quickly tested this with BitmapCacheOption.None and it seemed to only take up memory for the scaled image. As for the images looking wierd it may be due to a bug in WIC you may need get an updated version. Try Vista SP2 and the Platform Update For Windows Vista

    modified on Wednesday, May 5, 2010 3:00 PM

    WPF adobe help csharp wpf performance

  • Items collection must be empty before using ItemsSource !!!
    I Insincere Dave

    The separator you are adding in the xaml is being treated as an item, remove it or place it in the grid instead.

    WCF and WF css wpf wcf tutorial question

  • Problem in Jagged Line in 3d cube in wpf
    I Insincere Dave

    I think you may have to create it, there are quite a lot of discussions about it on the web that you can search for. I also came across http://stackoverflow.com/questions/39454/is-there-a-secret-trick-to-force-antialiasing-inside-viewport3d-in-windows-xp where it says it should be HKEY_LOCAL_MACHINE\Software\Microsoft\Avalon.Graphics\MaxMultiplesampleType. Neither of them exist on my vista machine but as they're mainly for debugging I think you create them. They affect all the WPF applications and its recommended your app/installer doesn't change them.

    WPF csharp wpf help tutorial

  • Problem in Jagged Line in 3d cube in wpf
    I Insincere Dave

    Anti-aliasing 3D content is not supported on windows XP. You could try changing HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics\MaxMultisampleType as described in this article http://msdn.microsoft.com/en-us/library/aa970912.aspx.

    WPF csharp wpf help tutorial

  • Vexing StackOverflow Issue [modified]
    I Insincere Dave

    StackOverflows are usually caused by infinte recursion so I would look for any recursive methods you have or perhaps you are accidentally creating a recursive structure of parent-child-parent controls.

    WCF and WF help csharp wpf question

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    I can't remember where I first saw code using RenderTargetBitmap, you need to call measure and arrange if the item hasn't been added to the visual tree otherwise it's not necessary. WPF uses WIC so that patch might still be applicable but I don't know if it will fix the issue.

    WPF csharp wpf testing beta-testing help

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    There is a recent update for WIC for xp that might contain the fix. This code might still cause the artifact you could try setting the BitmapScalingMode if it does.

    void ScaleUsingRTB(string inFile, string outFile, double scale)
    {
    Uri uri = new Uri(inFile);
    BitmapImage bitmapImage = new BitmapImage(uri);
    var image = new Image
    {
    Source = bitmapImage, Width = bitmapImage.PixelWidth*scale, Height = bitmapImage.PixelHeight*scale
    };
    image.Measure(new Size(image.Width,image.Height));
    image.Arrange(new Rect(0,0,image.Width,image.Height));
    RenderTargetBitmap rtb = new RenderTargetBitmap((int) image.Width, (int) image.Height, 96, 96, PixelFormats.Pbgra32);
    rtb.Render(image);

    Save(outFile,rtb);
    

    }

    WPF csharp wpf testing beta-testing help

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    Im glad that fixed it, I thought that was kind of a long shot really. I tried scaling an Image control and using RenderTargetBitmap and didn't notice any quality degradation so that might be a workaround for xp, there are some other options like System.Drawing aswell.

    WPF csharp wpf testing beta-testing help

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    http://support.microsoft.com/kb/971644[^] Says you use windows update to get it.

    WPF csharp wpf testing beta-testing help

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    The software rendering code goes in the loaded event and you apply it to the window, but im not sure it will have any effect if you are just saving the image and not displaying it. I've been working with a high res (5k by 7x) photo and haven't seen anything yet. Im using VS 2010 on vista but have tried targeting both 3.0 and 3.5 and checked they are referencing the correct version. I have also installed the platform update for vista which may have updated the windows imaging component. This thread is the only one i've found that might be applicable but I think you'll have to contact microsoft or try their wpf forums.

    WPF csharp wpf testing beta-testing help

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    I had already tried 2904,5000 and didn't see anything. You could try forcing software rendering and see if it is a driver issue if not I don't have any more ideas.

    HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;
    hwndSource.CompositionTarget.RenderMode = RenderMode.SoftwareOnly;

    WPF csharp wpf testing beta-testing help

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    I thought you were applying a RenderTransform to an Image, I didn't know you were working with TransformedBitmap. I haven't been able to reproduce the issue yet. The following for me scales a 4288x4288 px image image as expected:

    JpegBitmapDecoder dec = new JpegBitmapDecoder(new Uri(@"test.jpg"),BitmapCreateOptions.None,BitmapCacheOption.Default);
    var image = dec.Frames[0];
    var targetSize = 2900.0;
    var scale = targetSize/image.PixelWidth;
    TransformedBitmap scaledBitmap = new TransformedBitmap();
    scaledBitmap.BeginInit();
    scaledBitmap.Source = image;
    scaledBitmap.Transform = new ScaleTransform(scale, scale);
    scaledBitmap.EndInit();

    Content = new Image {Width = targetSize,Height = targetSize,Source = scaledBitmap};

    If you could change the code so that it does cause the artifact I'll have another look but you may want to try the MSDN forums as you might get a reply from someone on the WPF team.

    WPF csharp wpf testing beta-testing help

  • ScaleTransform sometimes produces glaring artifacts [modified]
    I Insincere Dave

    I don't completely understand the situation, are you enlarging or shrinking the images? You may want to post a picture too. As for the artifacts I would try changing the attached property RenderOptions.BitmapScalingMode and see if one of the modes eliminates the artifacts. I think they changed the default in .NET 4.0 to improve performance. Are the images photos or graphics, are you animating them? If they contain 1px wide lines or grids you may need to look at the positioning of the element, this is improved in .NET 4 by using LayoutRounding there are workarounds for previous versions.

    modified on Sunday, December 6, 2009 8:05 PM

    WPF csharp wpf testing beta-testing help

  • Looking For Video Software
    I Insincere Dave

    I've worked with a similar Camcorder (Vixia HF10). The format it records in is called AVCHD you'll want to make sure the software supports that. Adobe CS4 does but you'll need a fairly well specced pc to edit the footage unless you convert it to something else. For editing Windows Live Movie Maker claims to support AVCHD and is free, I didn't have the pixela software installed and ran into problems but you can convert the original clips using Avidemux to something else then edit using movie maker. Xvid Video, MP3 Audio in an Avi is a fairly common combination you might want use.

    The Lounge help c++ json question career

  • Combobox causes lock up
    I Insincere Dave

    How many results are there? The listbox will use a VirtualizingStackPanel im not sure about the ComboBox, if there are lots of results or you have a complex DataTemplate that could cause a slow down. You may want to break with the debugger when it stalls and look at the call stack too.

    WCF and WF csharp database linq question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups