by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Sep 22 13:02
    myCollections commented #3922
  • Sep 22 12:24
    punker76 commented #3922
  • Sep 22 11:51
    myCollections opened #3922
  • Sep 22 11:51
    myCollections labeled #3922
  • Sep 22 06:09
    sibille commented #3880
  • Sep 21 20:10
    RoboIndustries closed #3921
  • Sep 21 13:16
    AKruimink commented #3921
  • Sep 19 01:32
    RoboIndustries edited #3921
  • Sep 19 01:30
    RoboIndustries opened #3921
  • Sep 18 18:07
    batzen commented #3880
  • Sep 18 18:02
    batzen commented #3880
  • Sep 18 17:05
    batzen commented #3880
  • Sep 18 15:02
    sibille commented #3880
  • Sep 18 06:30
    TripleNico commented #3920
  • Sep 18 06:23
    TripleNico commented #3920
  • Sep 17 16:18
    timunie commented #3920
  • Sep 17 15:10
    TripleNico labeled #3920
  • Sep 17 15:10
    TripleNico opened #3920
  • Sep 16 22:29
    AKruimink edited #3917
  • Sep 16 22:27
    AKruimink edited #3917
Tim
@timunie
But what is wrong with a scrollviewer? It will only appear if the space is too less
enough space
image.png
too less space:
image.png
<Grid>

    <Grid.RowDefinitions>
        <RowDefinition Height="100" />
        <RowDefinition Height="2*" />
        <RowDefinition Height="100" />

    </Grid.RowDefinitions>

    <ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
        <StackPanel>
            <Button Content="Easy" />
            <Button Content="Easy" />
            <Button Content="Easy" />
            <Button Content="Easy" />
            <Button Content="Easy" />
            <Button Content="Easy" />
            <Button Content="Easy" />
            <Button Content="Easy" />
            <Button Content="Easy" />
        </StackPanel>
    </ScrollViewer>

    <Grid Grid.Row="0"
            Background="LightBlue"
            ShowGridLines="True" />

    <Grid Grid.Row="2"
            Background="LightGreen"
            ShowGridLines="True" />

</Grid>
Wobeam
@Wobeam
please take a look at my first post, a Window with Metro (Cobalt theme). I don't think that the scrollviewer is an appropriate solution there.
Tim
@timunie
yes your first image has another issue. As I said the XAML you posted does not reproduce it. So I need more input or even better a short sample App to help here.
There maybe an "invisble" control or a wrong Margin / Padding. But from the image I have no idea
Wobeam
@Wobeam
let me disagree with you, the simplified code reproduce exactly the same issue.
Tim
@timunie
does my screenshot show the issue?
Wobeam
@Wobeam
let me record the issue.
issue.gif
Tim
@timunie
Yes this is what WPF does. And we cannot change this.
So you need another solution for your issue. Either Scrollviewer or UniformGrid
Wobeam
@Wobeam
i wrote you above about UnifirmGrid.
Tim
@timunie
I know. But I would not reconmend it. If it is fine for you, use it.
Wobeam
@Wobeam
it becomes more sizeable, however there are problems with below buttons borders and with font.
Tim
@timunie
Yep
Tim
@timunie
@Wobeam there is nothing I can do to help you further. I am sorry
Wobeam
@Wobeam
never mind...
AKruimink
@AKruimink
bit late, but if you want scaling of ui elements you want to use scale tranform
```
<ScaleTransform ScaleX="{Binding ElementName=YourWindow, Path=ScaleValue}" ScaleY="{Binding ElementName=YourWindow, Path=ScaleValue}" />
this window uses scaling
elements rescale based on window width en height
that being said, @timunie sample is exactly wat normaly would be expected
Wobeam
@Wobeam
@AKruimink ,
thanks! I will play with that around.
kranthi kumar
@kranthikumar88_gitlab
hi all
i am new user to ManApps Metro controls
can someone point me to documentation on how to customize mouse hover color for numeric up & down buttons ?
Tim
@timunie
Hi @kranthikumar88_gitlab
I think you need to override the ControlTemplate on your own .
So you need to adjust the Triggers for MouseOver
kranthi kumar
@kranthikumar88_gitlab
thanks tim, i will look in to that
Tim
@timunie
you are welcome & Happy coding :-)
kranthi kumar
@kranthikumar88_gitlab
hey tim, the member Property="SwitchUpDownButtons" is not recognizable or not accessible is error i get after adding style to resource dictionary , should i refer some other namespace ?
Tim
@timunie
which version do you use?
kranthi kumar
@kranthikumar88_gitlab
1.6.5
Tim
@timunie
ahh the XAML is for 2.X.X
kranthi kumar
@kranthikumar88_gitlab
so for 1.6.5 there is not customization available ?
Tim
@timunie
it is but with different code
kranthi kumar
@kranthikumar88_gitlab
ok
Tim
@timunie
I would update if you can. v2 is sooo much better. If not, here you go
kranthi kumar
@kranthikumar88_gitlab
thanks tim
Tim
@timunie
:pray:
Twitter Tweets
@mrjakepavek_gitlab
private async void btnDepart_Click (object sender, RoutedEventArgs e)
        {
            var window = App.Current.Windows.OfType<MetroWindow>().First(x => x.IsActive);

            if (ParkedTruck.DepartTruck())
            {
                Close();
                ViewModel.GetTruckLogs();
                ViewModel.GetDepartedTrucks();
                ViewModel.RaiseStaticPropertyChanged("ParkedTrucks");
                await window.ShowMessageAsync("Success", $"Truck has been departed at: {DateTime.Now}");

            }
            else
            {
                await window.ShowMessageAsync("Failed", $"There was a issue when departing the truck.");
            }

        }
question, the success message works sometimes but it gives me this error sometimes: Sequence contains more than one element'