vpapenko / colorpicker Goto Github PK
View Code? Open in Web Editor NEWColor pickers for Xamarin Forms.
License: MIT License
Color pickers for Xamarin Forms.
License: MIT License
I'm trying to use this nuget package but I've got a problem with the ColorWheel.
When the initial value of the SelectedColor is black(Color.FromHex("#FF000000")) and I use the the colorpicker to set a new value my property in the viewmodel isn't updated.
When I first set my property to another color and then update via the colorwheel my setter is triggerd
Viewmodel property:
public Color EditedColor1
{
get { return _editedColor1; }
set
{
_editedColor1 = value;
Settings.AddOrUpdateValue("color1", _editedColor1.ToHex());
RaisePropertyChanged(() => EditedColor1);
ColorChanged(1);
}
}
View
<colorPicker1:ColorWheel Grid.Row="2" Grid.Column="0" x:Name="ColorWheel1" VerticalOptions="FillAndExpand"
ShowAlphaSlider="False"
ShowLuminositySlider="False"
ShowLuminosityWheel="False" SelectedColor="{Binding EditedColor1, Mode=TwoWay}" PropertyChanged="ColorWheel1_OnPropertyChanged"
/>
I didn't use the nuget package itself because I'm using a newer version of Xamarin forms so I downloaded your code updated the package and used that dll.
With the slides the problem doesn't occur.
I'm trying to create a multiple-targeting library for Xamarin(Android, IOS and UWP.) I examined project files of some multi-targeting xamarin libraries. (Such as Rg.Plugins.Popup, Xamarin.Essentials, MvvmCross) and edited the csproj file of my library(XamTemel.Ortak) like this.
<Project Sdk="MSBuild.Sdk.Extras/3.0.22"> <PropertyGroup> <TargetFrameworks>netstandard2.0;Xamarin.iOS10;monoandroid10.0;</TargetFrameworks> <TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);uap10.0.17763;</TargetFrameworks> <DebugType>portable</DebugType> <Configurations>Debug;Release</Configurations> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)'=='Debug' "> <DebugSymbols>true</DebugSymbols> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)'=='Release' And '$(OS)' == 'Windows_NT' "> <!-- sourcelink: Declare that the Repository URL can be published to NuSpec --> <PublishRepositoryUrl>true</PublishRepositoryUrl> <!-- sourcelink: Embed source files that are not tracked by the source control manager to the PDB --> <EmbedUntrackedSources>true</EmbedUntrackedSources> <!-- sourcelink: Include PDB in the built .nupkg --> <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> </PropertyGroup> <ItemGroup> <Compile Remove="Platforms\**\*.cs" /> <None Include="Platforms\**\*.cs" /> </ItemGroup> <ItemGroup Condition=" $(TargetFramework.StartsWith('monoandroid')) "> <None Remove="Platforms\Android\**\*.cs" /> <None Remove="Platforms\Xamarin\**\*.cs" /> <Compile Include="Platforms\Android\**\*.cs" /> <Compile Include="Platforms\Xamarin\**\*.cs" /> <AndroidResource Include="Resources\**\*.xml" SubType="Designer" Generator="MSBuild:UpdateAndroidResources" /> <AndroidResource Include="Resources\**\*.json" Generator="MSBuild:UpdateAndroidResources" /> </ItemGroup> <ItemGroup> <PackageReference Include="ColorPicker.Xamarin.Forms" Version="1.3.4.11" /> </ItemGroup> </Project>
As you can see I am going to put platform renderers in Platform/Android-IOS-UWP etc. Not this works fine on Android. But ColorPicker library gives me this error on UWP.
I don't understand why it cannot find ColorPicker. Version number seems okay. What am I doing wrong?
Here is the sample solution.
https://drive.google.com/file/d/1PnqFyzDmTBom6GH9YVdbyBvNwikitYlC/view?usp=sharing
This code can be deleted
as is handled by the base class
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Scroll view "OnScrolled" event should be disabled
Desktop (please complete the following information):
Something is wrong when the color picker is child element of TabViewItem(control -> Xamarin Community Toolkit TabView).
https://docs.microsoft.com/en-us/xamarin/community-toolkit/views/tabview
The color picker becomes transparent, but the color selection is still available.
You can swipe and see the selected color is changing.
I attached the sample which shows the issue.
Steps to reproduce the behavior:
Expected behavior
The Color picker must be visible and displayed.
Sample Project
ColorPicker-master.zip
Information
When I try to install this package through NuGet, it fails with the complaint that it's not compatible with NetStandard.Library 2.0 and that I need 2.1
The only issue is that there's no 2.1 NetStandard.Library available to me.
I'm on the latest release of that package and that's 2.0.3
Here's a screen showing that I can't update my version any higher
https://drive.google.com/open?id=15WOeztPKYt-MfhZPLIhBc_3YUrGJekkZ
and here's the package requiring 2.1
https://drive.google.com/open?id=1UVytQ7jorgePWdn54E7qyS-v8Jl4ZqpI
and I'm using Visual Studio Community 2017 on Windows 10 Pro
Is there anything I have to do to be able to get NetStandard.Library 2.1?
I'm using FreshMVVM and the master detail navigation container. This seems to cause an issue when the colorpicker is in a detail view (iOS only). Pressing on a new location works fine but dragging the selected circle causes the wheel to freeze. I'm guessing it's due to the fact you can slide to open the menu
Ideally the colorpicker would work in the detail view
I can create a sample project if that would help
Is your feature request related to a problem? Please describe.
Doesn't support UWP
Describe the solution you'd like
Please include UWP
Describe alternatives you've considered
Additional context
I think it would be very easy to add UWP as skiasharp is fully supported in UWP.
I am trying to build a app, where you get a preview of the current settings. DataBinding is not an option here.
Would it be possible, to add a ColorChanged Event, similar to the TextChanged/ Pressed Events of the Entry/ Button Class?
like:<Button Pressed="ButtonPressedEvent"/>
->
<ColorCircle ColorChanged="ColorChangedEvent"
Describe the bug
When I download the package I get a warning that conflicts from different versions of SkiaSharp found that could not be resolved...
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No warning
Desktop (please complete the following information):
Smartphone (please complete the following information):
Describe the bug
UWP app started to crash after updating the Xamarin Forms app to the latest Xamarin Forms version.
Upon Further analysis on the issue, it is identified that when ColorPicker NuGet Package is installed, it adds SkiaSharp (1.60.3) as a dependency, and the app works without any issue
SkiaSharp version gets updated, When adding/installing another NuGet package that contains a reference to higher SkiaSharp version.
As a result app crash, when the SkiSharp version gets updated to 2.80.2 from 1.60.3.
Expected behavior
App Should work without crashing.
To Reproduce
Steps to reproduce the behavior:
Syncfusion.Xamarin.DocIORenderer
Desktop:
Additional context
Please find the attached sample code with the crash issue.
ColorPicker.Nuget.Test-master (2).zip
I am irked that the WINUI 3 ColorPicker is so complex and not easy to use in C# code.
I would much prefer a more straightforward implementation such as provided by this project, although I do realize that a new implementation would require creating a Handler rather than a custom Renderer.
One desirable feature enhancement would be to allow specification of, and the display of,a hex value, e.g. #rrggbbaa
with alpha, or #rrggbb without alpha (would default to 100%)
Describe the bug
Dragging the sliders on the controls on iOS will move the slider a small amount and then stop. Afterwards no further interaction (pressing or sliding) will move the slider.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The slider should move to the tapped location, or be able to moved via pressing and sliding
Smartphone (please complete the following information):
Additional context
Also, trying to slide any of the sliders to the right just instead results in the flyout page menu being displayed.
Describe the bug
Unable to generate the release build, when we try to build for Processor architecture x64 & ARM
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The app should generate UWP release build for x86, x64 & ARM without any issue.
Desktop (please complete the following information):
Describe the bug
When I try to bind the SelectedColor to a ViewModel class it gets the value, but won't set it
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect my view model property SET to be called any time the color changes.
Desktop (please complete the following information):
Additional context
If I change my xaml to be similar to the TestApp project so that another control in the xaml uses a reference binding then it work, but only if I remove my binding to my view model property. If they are both there, then neither one updates.
Note that when I have my view model binding in place and I set a break point in the GET of my property it does hit it and retrieves the color just fine.
Here is my xaml:
<StackLayout Orientation="Vertical" BackgroundColor="{Binding Source={x:Reference LabelColorWheel}, Path=SelectedColor}">
<colorpicker:ColorCircle x:Name="LabelColorWheel" SelectedColor="{Binding LabelColor}"/>
</StackLayout>
Here is my view model:
private Color _labelColor;
public Color LabelColor
{
get { return _labelColor; }
set
{
if (_labelColor != value)
{
_labelColor = value;
SafePropertyChanged("LabelColor");
}
}
}
I am sorry my formatting isn't very good. It doesn't seem to paste code like I expect.
Hi,
I'm using the ColorPicker on a multi-target. On android all works fine but on IOS the sliders of the picker not works. When I try to move them, they don't move.
Can someone who had this issue help me ?
Or is this working for someone on IOS ?
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.