cornerradius

How to add a border/corner radius to a LinearProgressIndicator in Flutter?

人盡茶涼 提交于 2019-12-14 03:58:15
问题 I am trying to add a border radius to a LinearProgressIndicator in Flutter. When I replace the LinearProgressIndicator with another widget (e.g. Text ) in the code below, it works, as expected. Container( decoration: new BoxDecoration( borderRadius: new BorderRadius.all(const Radius.circular(20.0))), child: LinearProgressIndicator( value: _time, ), ) 回答1: For exact your needs follow this dependency https://pub.dev/packages/percent_indicator Try this template code child: Padding( padding:

iOS: Layer shadow path is not correct

纵饮孤独 提交于 2019-12-11 13:54:57
问题 I have UIView in my design and I need to allow user to change the corner radius. I have designed the testier using @IBDesignable and @IBInspectable . I am getting the expected shape( cornerRadius curve) upto the 33% of cornerRadius e.g bounds.size.width = 100 , I am getting correct shadow shape if corner radius is upto 33. If cornerRadius is more than 33 then shadow shape becomes circle irrespective of original shape cornerRadius . Any suggestion? Please refer the code and design screenshot

Set corner radius to particular side of UIView/UIButton only

无人久伴 提交于 2019-12-11 01:56:57
问题 I want to set corner radius to my UI element as shown in attached snap: I tried setting corner radius using UIBezierPath but it doesn't give expected result. I also added those three UIButton s in UIView and set corner radius to Container view but no use. With reference to https://stackoverflow.com/a/31233171/4886069 , Following is the code what I've tried on top and bottom buttons: let rectShape = CAShapeLayer() rectShape.bounds = self.scanButton.frame rectShape.position = self.scanButton

Can you databind to CornerRadius via WPF Styles?

假如想象 提交于 2019-12-10 23:48:35
问题 I have a Button style and can't seem to property databind the border's CornerRadius property to the template. This is a dependency property, so it should be data bindable. I wonder if I'm missing the right XAML syntax to use? <Style TargetType="{x:Type Button}" BasedOn="{x:Null}"> <Setter Property="FocusVisualStyle" Value="{DynamicResource MyButtonFocusVisual}"/> <Setter Property="Background" Value="{DynamicResource MyButtonBackgroundBrush}"/> <Setter Property="Foreground" Value="

How to remove rounded corners in PopoverView?

五迷三道 提交于 2019-12-10 19:42:45
问题 I built a custom Popoverview, but fail to remove the content's rounded corners. Tried to set .layer.cornerRadius = 0.0 in almost every view in found, with no success. Image Link: Custom Popover Red border is of UIViewController used to init the UIPopoverController with, green is background of custom UIPopoverBackgroundView. 回答1: Answer from this thread: UIView default styling has rounded corners? There is no supported way to make the view inside of your UIPopoverController not have rounded

iOS UIButton with rounded corners and background bug

六眼飞鱼酱① 提交于 2019-12-10 04:01:56
问题 I found one weird issue with rounded UIButton. This is my code block to create this button. let roundedButton = UIButton(type: .System) roundedButton.frame = CGRectMake(100, 100, 100, 100) roundedButton.backgroundColor = UIColor.blackColor() roundedButton.layer.borderColor = UIColor.whiteColor().CGColor roundedButton.layer.borderWidth = 3.0 roundedButton.layer.cornerRadius = roundedButton.frame.size.width/2 roundedButton.layer.masksToBounds = true self.view.addSubview(roundedButton) As you

How to change the CornerRadius of the Combobox WPF

被刻印的时光 ゝ 提交于 2019-12-05 21:04:22
I want to use a ComboBox with different CornerRadius , how can I change that simply? I've tried with Style and ControlTemplate , but without any success. I don't know if this is simple, but creating a ControlTemplate based on the default ComboBox should do the trick. Here is an example: <Style x:Key="ComboBoxTextBoxStyle" TargetType="{x:Type TextBox}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TextBox}"> <Grid> <Border CornerRadius="5,0,0,5" BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="Black"> <ScrollViewer x:Name="PART

iOS UIButton with rounded corners and background bug

半城伤御伤魂 提交于 2019-12-05 04:01:11
I found one weird issue with rounded UIButton. This is my code block to create this button. let roundedButton = UIButton(type: .System) roundedButton.frame = CGRectMake(100, 100, 100, 100) roundedButton.backgroundColor = UIColor.blackColor() roundedButton.layer.borderColor = UIColor.whiteColor().CGColor roundedButton.layer.borderWidth = 3.0 roundedButton.layer.cornerRadius = roundedButton.frame.size.width/2 roundedButton.layer.masksToBounds = true self.view.addSubview(roundedButton) As you can see, there's a UIButton with backgroundColor, border and corner radius. It's fully rounded. But in

UITableView cornerRadius with border performance issues on iOS

只谈情不闲聊 提交于 2019-12-04 03:31:23
问题 I have some interesting notice with scrolling performance on UITableView with cornerRadius , borderWidth and borderColor enabled. self.tableView.layer.cornerRadius = 10.f; self.tableView.layer.borderWidth = 1.0f; self.tableView.layer.borderColor = [UIColor whiteColor].CGColor; If I remove borderWidth and borderColor than scrolling gets 60 FPS no problem. As long as I add those two properties to layer FPS drops. Does anyone have a suggestion or explanation why this strange behavior happens?

customize the Border property with CornerRadius for ListBox

隐身守侯 提交于 2019-12-04 00:47:49
问题 I want to customize the following Listbox-display property of border with CornerRadius=5..can anyone help me to achieve it without changing the existing datatemplate code in the following Xaml code: <ListBox x:Uid="lst_value" Name="lstValues" Background="Wheat" BorderBrush="Black" HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="1" Height="100" Width="150" ItemsSource="{Binding listval}" > <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Vertical" Background="