Search Results

Search found 2 results on 1 pages for 'duney'.

Page 1/1 | 1 

  • How can I have a Label change dynamically based on a Slider Value?

    - by duney
    I'm writing a grade calculator and I currently have a slider with a textbox beside it which displays the current value of the slider: <Slider Name="gradeSlider" Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Minimum="40" Maximum="100" IsSnapToTickEnabled="True" TickFrequency="5" TickPlacement="BottomRight"/> <TextBox Name="targetGrade" Grid.Row="3" Grid.Column="3" Width="30" Height="23" Text="{Binding ElementName=gradeSlider, Path=Value}" TextAlignment="Center"/> However I'm struggling to include a label which will show display a different grade classification based on the slider's value range. I'd have thought that I could create the label: <Label Name="gradeClass" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Bottom"/> And then use code: string gradeText; if (gradeSlider.Value >= 40 && gradeSlider.Value < 50) { gradeText = "Pass"; gradeClass.Content = gradeText; } else if (gradeSlider.Value >= 50 && gradeSlider.Value < 60) { gradeText = "2:2"; gradeClass.Content = gradeText; } else { gradeText = "so on..."; gradeClass.Content = gradeText; } But the label just stays as "Pass" whatever the slider value. Could somebody please advise me as to where I'm going wrong? I tried using Content = "{Binding Source = gradeText}" on the Label xaml and removing the gradeClass.Content's in the code but it complained that gradeText was declared but never used. Many thanks to anyone who can help.

    Read the article

  • Wavefront obj loader iphone materials problem

    - by Magda
    Hi! I use Bill Duney wavefront obj loader. I'm new in opengles and it was really helpful. unfortunately... I exported a revit file to dwg and then open it with blender/google sketchUp and then to wavefront obj. Next, add my files to your loader and got strange results. The project load correctly vertex and normals but does a strange results with materials (I use only material, without textures). The one file is loaded with some materials on different faces the other, doesn't load materials but after a click makes the model green. If you have a minute and could help me out, please. I uploaded the project here. http://www.sendspace.pl/file/ecd348a3674ed1fe6eb10e5 Thanks for answering, Magda

    Read the article

1