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
2

2hdass

@2hdass
About
Posts
82
Topics
68
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Dimming the indicator of a custom progressbar
    2 2hdass

    Hi there, I am new to WPF, I have just learned how to customize the progressbar by using a control template. I made it so that the indicator part of the progressbar has a gradient effect. Now i actually want it to fade in as the value increase, I know that I can make use of the triggers on the value of the progress bar and set the opacity of the indicator, but i am not sure how that can be done. Also, I would like to have a box following the top of the indicator to indicate the value of the progessbar, my approach is to create another column from the grid, place a textbox inside, and then again using trigger change the coordinates of the box. But i am not sure how i can convert the value of the progressbar to the coordinates of the textbox. here is what i have so far

    <UserControl
    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"
    mc:Ignorable="d"
    x:Class="IceControls.CivicProgressbar"
    x:Name="UserControl" d:DesignHeight="492" Width="50">
    <UserControl.Resources>

        <ControlTemplate x:Key="templateThermometer"
                         TargetType="{x:Type ProgressBar}">
    
            <ControlTemplate.Resources>
                <LinearGradientBrush x:Key="brushStem" 
                                     StartPoint="0 0" EndPoint="7 0">
    				<LinearGradientBrush.Transform>
    					<RotateTransform  Angle="90"></RotateTransform>
    				</LinearGradientBrush.Transform>
                    <GradientStop Offset="0" Color="white" />
    				<GradientStop Offset="1" Color="transparent" />
                </LinearGradientBrush>
    
            </ControlTemplate.Resources>
    		
          
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="\*" />
                </Grid.RowDefinitions>
    
              
                <Grid Grid.Row="0">
                    <Grid.ColumnDefinitions>
    					<ColumnDefinition Width="100\*" />
                    </Grid.ColumnDefinitions>
    
                  
                    <Border Grid.Column="0" BorderBrush="Gray" 
                            BorderThickness="1 1 1 1"
                            CornerRadius="6 6 0 0" >
    
    WPF wpf csharp html css database

  • Customizing Foreground (the moving part) of a progressbar in WPF
    2 2hdass

    hmm i dont understand?

    WPF wpf question csharp wcf tutorial

  • Customizing Foreground (the moving part) of a progressbar in WPF
    2 2hdass

    Hi guys, I am really new to WPF. I unerstand the concept of using Templates to create customization of a control, and i have attempted to change the visual behaviour of the Progressbar control and now hitting a brick wall. So there are 3 things i would like to do: 1) Remove the 3d shiny part of the control - i dont like the 3d ness I used control template to modify the foreground, i sucessfully killed the 3d shininesss, but moving part is expanding itself starting at the center point of the entire progress bar, and that it only expends to 100 pixels wide. this is because i set te Width=Value the foreground rectrangle's width attribute. How do i make it so that when the value = 100, the progressbar is fully filled?

    			<Rectangle Fill="{TemplateBinding Foreground}"
    			Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Width}"
    			Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value}" 
    			Margin="0,0" ></Rectangle>
    
    1. Have a textbox following the top of the moving part to indicate a value - I have no idea how to do this 3) Make the whole control an arc, so that it looks like a fuel gauge - I know i can transform it,skew, size it whatever, but not warp it. thx alot guys
    WPF wpf question csharp wcf tutorial

  • A user control from a n0ob
    2 2hdass

    How can i do that? Do you have any example?

    WPF csharp wpf help question

  • A user control from a n0ob
    2 2hdass

    Hi, I am new to WPF, just seeking some help. I wanted to create a user control at which it is like an augmented panel(lets call it userpanel). There is a panel where content can be placed, and some buttons on top of the panel to do something. What do i need to do to make what ever content i put into the usrpanel.content to go into the panel of the user control? Right now if i insert some words into the Content of the usrpanel, the whole control blanks out with the text i punch in. thank you :D

    WPF csharp wpf help question

  • Assigning Generic Type during runtime
    2 2hdass

    Is that the only way to do this? I know that reflection is rather expensive.

    C# design help question

  • Assigning Generic Type during runtime
    2 2hdass

    In the code I am working with i have a class called RecordHistoryService<x,y> X, and Y are unknown at design time and known at runtime i need to instantiate RecordHistoryService<x,y>, is there any way to do it? I have this, but it doesnt compile: i.e.

    Type _rhType = Type.GetType(rhType);
    Type _entityType = Type.GetType(entityType);
    RecordHistoryService<_rhType, _entityType> recordHistory;

    thx for your help :D

    C# design help question

  • DirectX C# - creating a button
    2 2hdass

    I am trying to create a UI for my DirectDraw interface that replaces the getto Today screen in Windows Mobile 6. I am using C# managed code to develop the interface. I realize that there is something called DXUT in the .Net framework that provides functionalty of a UI elements such as a UI Button. Is there such thing for the mobile framework? If not, I will have to implement my own button. How do i raise an event that checks if the mousetap is within bounds of a button? Do i actually have to implement the code to continously check if the mouse is inside the bounds of the button? Would that cause a high cpu utilization? Some kind of threading? please advice :D

    C# csharp question dotnet graphics design

  • Thumb operated UI in WM
    2 2hdass

    There is a new UI freeware available for WM5 and WM6. This UI, called PointUI is a thumb enabled UI that makes your WM phone much easier to use. I am a WM device developer, and this UI inspired my next project. I am thinking to use an interface just like PointUI (i.e. without all the windows buttons, scrollbars) I am not too experience in this fashion as I have only programed using windows forms in WM devices. What would be a good choice to start with if I want to program in .NET? Would directdraw be a good choice?

    Mobile csharp winforms design question

  • the windows mediaplay control
    2 2hdass

    My applications has 2 listboxes in it, what the program does is that it will play the video from listbox1 but for each 15 seconds it will stop the video, and then play the short videos from a 2nd listbox. When the video from th e 2nd listbox finishes, it will resume playing the video from listbox1. I have a function that handles the openstatechange event and another function that handles playstatechange event. My implementation works as following: When the play button clicks, it will start playing the first item on the first listbox, the 15 seconds timer starts at the same time the video will start playing when the timer is up, the timerinterval event will fire, and in this event handler, i pause the video, store the currently playing position, and then stop the video and then use the .URL to make the wmplayer load a video from the second list. The openstate event will take care of the playing when the the openstate changes to "mediaopen" and will start playing This all works fine. Now the problems occurs when the short video finsihes playing. A playstate event handler handles the event that a media has stopped, in this case, the code loads the video from the first list to resume, and then also sets the currentplaytime. once i have set the .URL property, the playstate changes to "transitioning" and the openstate changes to "mediaopening" indefiniately. And for this reason, the .play function in my openstate event handler which only executes the .play() function when the openstate=mediaopen does not occur. am i missing something here? Maybe perhaps the video from the first list is a wmv file while video from the 2nd list is a divx avi file?

    Visual Basic question career

  • Creating a "Loading" dialog with progress bar
    2 2hdass

    I am quite new to windows form programing. In my application i want to be able to show a dialog box that has a progressbar in it when the main form loads a set of images into memory. I have created the form that contains a progress bar in it.. now what? Thank you very much

    Visual Basic performance question

  • Loading images async
    2 2hdass

    Is there any way to generate the thumbnail without loading the whole image into memeory first? I realize that by using the Image will load into memory right away. How do i do the above async? There is no loadasync method in the Image class Also, is there a way to tell if the picture has finish loaded into memory? perhaps by extending the picturebox or something?

    Visual Basic question

  • Loading images async
    2 2hdass

    My application requries loading all the pictures from a specified folder, and then reading the exif meta data off them. Pictures will be displayed by PictureBoxes, and that the images are loaded using the PictureBox.Image property. I cannot make it work by using the PictureBox.LoadAsync() function because the LoadAsync() method does not read the exif meta data. And here are my questions: 1) Is there any way to generate the images without first loading the whole image into memeory? As of this moment, my thumbnails are generated by first setting the PictureBox.Image property, and then use the PictureBox.getthumbnailimage and then setting the PictureBox.image to the thumbnail, which first loads the whole image into memeory, and then generating one, and then finally assigning it back to the picture box 2) Is there any way to load the picture Async without using the LoadAsync() function. Or is there any way to load the picture using the LoadAsync() function while keeping all the exif meta data available? thank you very much

    Visual Basic question

  • extended picturebox
    2 2hdass

    Hi, i have been trying to create my own version of the picture box, i did this by first creating a user control and then using the keyword inherits System.Windows.Forms.PictureBox What i really want to do is that i wanna be able to create a button that is 50% transparent when mouse is no over it, and it will become opaque when the mouse hovers over it. I made it a picturebox because it will load a gif image from the resx file. I have overrided the OnPaint function so that it will display the image in the control, the layout is as following. I put this control on top of another PictureBox, and when I run it, it gives me a while box instead of displaying the image. I debugged it and find that the displaying of the image is fine until this onPaint is over, (i.e. when the pointer steps out of this method, and that the PictureBox underneath is displayed, this control will turn into a white box) How can i fix this?!:confused::confused: Thx Code: Protected Overrides Sub OnPaint(ByVal pe As PaintEventArgs) MyBase.OnPaint(pe) Dim g As Graphics = Me.CreateGraphics() g.Clear(Me.BackColor) '-------------------call image from resources --------- Dim myAssembly As System.Reflection.Assembly myAssembly = Me.GetType.Assembly ' Creates the ResourceManager. Dim myManager As New _ System.Resources.ResourceManager("PictureResizer.Images", _ myAssembly) Dim myImage As System.Drawing.Image myImage = CType(myManager.GetObject("flipccw"), _ System.Drawing.Image) '---------------------------------------------- Dim bitmap As Bitmap = New Bitmap(myImage) Dim clrMatrix As ColorMatrix = _ New ColorMatrix(New Single()() _ {New Single() {1, 0, 0, 0, 0}, _ New Single() {0, 1, 0, 0, 0}, _ New Single() {0, 0, 1, 0, 0}, _ New Single() {0, 0, 0, 0.5F, 0}, _ New Single() {0, 0, 0, 0, 1}}) Dim imgAttributes As ImageAttributes = New ImageAttributes() imgAttributes.SetColorMatrix(clrMatrix, ColorMatrixFlag.Default, ColorAdjustType.Bitmap) g.DrawImage(bitmap, New Rectangle(0, 0, Me.Width, Me.Height), _ 0, 0, bitmap.Width, bitmap.Height, _ GraphicsUnit.Pi

    Visual Basic graphics question help announcement

  • PictureBox and mem usage
    2 2hdass

    I am currently working on a project that involves previewing large amount of photoes at the same time, my program will have a view at which it will show the preview of all the image files in a particular directory. As of this moment, all the pictures are shown by using creating a PictureBox control for each picture and then shoving them into a panel. I realize that the mem usage is huge after loading about 120 pictures of ~900kb in size. I am suspecting it is because each PictureBox has loaded the FULL image into the memory, but not the thumbnail. I do realize that in the Image class, there is something called the getthumbnail() mehtod, how do i make use of this? Image is an abstract class, i cant use it directly, do i use some kind of file reader to open a stream and read it as an Image and then use the getthumbnail() method to get a thumbnail and then use it as the image for the pictureBoxes? thank you for your help :D

    Windows Forms question performance help

  • global variable resetting?!
    2 2hdass

    I am currently developing an AJAX enabled calendar i have a back and forward button that scrolls through the month of the year A global variable called currentDate is set during the first load, and and it will be changed by the event handler for the back and forward buttons however, right now for some reason, the global variable resets itself to the declared default value automatically every time i press the back/foward button. I think i am doing something wrong the updatepanels and stuff I wrote the calander, the back and forth button in a control and then i place the control in a updatepanel in the actual page. It seems like that the control is being re-created everytime i press the button? can someone help!?

    ASP.NET help question

  • Adding attribute to tag when rendered
    2 2hdass

    for some reason, i dont see it showing up when it is renedered. I am using this in a control. i did this : Me.Attributes.Add("name", "somename")

    ASP.NET html tutorial

  • Adding attribute to tag when rendered
    2 2hdass

    I am wondering how to add a attribute to an ASP control so that the attribute will show up in the HTML when it is rendered

    ASP.NET html tutorial

  • Profiles and existing database
    2 2hdass

    i am trying to implement Profile on my web app so that it is possible to have personalization in it. I learned that in order to make use of the Profile class, i will need to use the login controls provided in asp.net in order to secure the authenticated user in th HTTPContext.current so that the userprofile called when using Profile represents the logged in user. I already have my own authentication implemented and i hope not to change it. Is there any way i can retrieve a profile, and set it as the current profile without letter ASP setting it automatically in HTTPContext.current?

    ASP.NET csharp asp-net database security question

  • Saving my menus
    2 2hdass

    Yes, i know that Ajax doesnt do post backs, however, not all buttons in my application are Ajax enabled. As of now, i am only trying to migrate the menu to Ajax, so, clicking on any button not on the menu will do a post back

    ASP.NET help 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